A visual measurement method for apparent crack geometric parameters
By combining image acquisition equipment and laser rangefinders to calculate pixel accuracy and perform color mapping, the problem of difficult to measure and visualize apparent fracture geometric parameters in the prior art is solved, and accurate measurement and intuitive visualization of fracture width, length and area are achieved.
Patent Information
- Application Number
- CN202111577969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-22
AI Technical Summary
The prior art is difficult to intuitively measure and visualize the geometric parameters of apparent fractures, especially the fracture width, and cannot obtain pixel accuracy, making it difficult to understand the actual development status of the fracture.
A visual measurement method for apparent fracture geometric parameters is adopted. By collecting fracture images and combining with a laser rangefinder to obtain the camera working distance, calculating pixel accuracy, and then calculating the average width, length and area of the fracture, and visualizing it through color mapping.
The visualization results of the crack width are achieved, the accurate values of the actual length, area and average width of the crack are obtained, and the understanding of the crack development status is improved. The method is efficient and convenient, and the results are real and reliable.
Smart Images

Figure CN114419079B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of building and road repair and maintenance, and specifically to a method for visually measuring apparent crack geometric parameters. Background Art
[0002] With the development of society and the increasing requirements of people's lives and production for infrastructure, the stock of various buildings and roads is also growing. Routine inspection and maintenance are important guarantees to ensure the safe and timely service of these infrastructures. Among them, the measurement and statistics of apparent cracks are an important part of such work. Such cracks are narrow in shape, widely distributed, and randomly and disorderly in position, which consumes a lot of energy. So this year, researchers have tried to propose and use various new statistical methods for apparent cracks. Compared with the existing commonly used methods, the measurement of apparent crack-related parameters based on digital images is widely used because of its simplicity, convenience, and mature technology. Among several parameters, crack width is very important. It can describe the development status of existing cracks and predict the future development trend of cracks, which makes it easier for staff to take necessary maintenance measures. However, the existing algorithms can only calculate the average width of cracks and cannot give visual width measurement results. It is difficult for front-line staff to intuitively understand the specific values of crack widths at various locations. In addition, most images obtained based on existing methods fail to obtain their pixel accuracy, that is, according to the measurement results, most of them can only understand their pixel distance values, and it is difficult to obtain the actual values of geometric dimensions such as width and length. These bring troubles to the detailed understanding of the development status of cracks at various locations. Summary of the invention
[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a method for visually measuring the geometric parameters of apparent cracks, which can provide people with visual results of crack width and calculate the average width, length and area of cracks based on the crack images collected by imaging equipment in relevant areas. At the same time, a laser rangefinder is used during imaging to obtain the working distance of the camera, and the image pixel accuracy is calculated in combination with the focal length used, thereby calculating the width at each location as well as the actual value of the crack length, the actual area of the crack and the actual value of the average width of the crack.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] The present invention provides a method for visually measuring apparent crack geometric parameters, comprising the following steps:
[0006] S1: Perform image acquisition and distance measurement; first adjust the camera to a position where the main optical axis is parallel to the normal line of the acquired surface and a working distance is left. While keeping the current relative angle and working distance unchanged, use the camera to capture and obtain an image of the target area. At the same time, use a distance measuring instrument to measure the camera working distance L;
[0007] S2: Perform image preprocessing and image segmentation; first convert the color image obtained in S1 into a grayscale image, then use image filtering to reduce the noise in the image; then use the image segmentation method to obtain a binary image with the cracks segmented out; then amplify the edge of the binary image by a circle of pixels representing the matrix;
[0008] S3: Obtain pixel accuracy; based on the camera working distance L, the image pixel accuracy calculation formula is as follows:
[0009]
[0010]
[0011]
[0012]
[0013] Where: W camera and H camera is the width and height of the camera target surface, f is the focal length of the camera, H and W are the height and width of the camera field of view respectively; a and b are the number of pixels of the image in the width and height directions respectively; w and h are the pixel accuracy of the image in the width and height directions respectively;
[0014] S4: Obtain pixels of the crack-removed skeleton region, obtain the coordinates of the crack skeleton pixel closest to the pixel of the crack-removed skeleton region and the distance value between the nearest crack skeleton pixel and the pixel of the crack-removed skeleton region, traverse the pixels of the crack-removed skeleton portion, and obtain the corresponding label array using a line covering method;
[0015] S5: Obtain pixels in the crack removed edge region, obtain the coordinates of edge line pixels closest to the pixels in the crack removed edge region and the distance value between the nearest edge line pixels and the pixels in the crack removed edge region, traverse the pixels in the crack removed edge line portion, and obtain the corresponding label array using a line coverage method;
[0016] S6: merge the arrays annotated by S4 and S5; replace the elements in the array annotated by S4 that are smaller than those in the array annotated by S5 with the corresponding elements in the array annotated by S5; then multiply each element of the array annotated by S4 after replacement by the pixel accuracy w of the image in the width direction in S3, and replace the pixel distance with the actual distance;
[0017] S7: Color mapping and measurement result export; use color scaling on the actual distance array obtained in S6 to obtain the visualized measurement result and export the current window content width. The visualization measurement result is obtained.
[0018] Preferably, in step S3, the ratio of the camera target surface width to height is equal to the ratio of the number of pixels in the image width and height directions, w=h.
[0019] Preferably, the step S4 specifically includes:
[0020] S4.1: Obtain the crack skeleton; obtain the number of pixels representing the crack n and the crack skeleton pixel length 1; combine the pixel accuracy w of the image in the width direction in S3 to calculate the actual value of the average crack width d, the actual crack length Lcrack and the actual crack area S; the calculation formula is as follows:
[0021]
[0022] S=n×w×w (6)
[0023] L crack =l×w (7)
[0024] S4.2: Obtain the portion of the crack-removed skeleton, and obtain a set of coordinates of pixels of the crack-removed skeleton; and establish a blank array of the same size as the binary image for recording the marking values, recorded as marking array 1;
[0025] S4.3: Select the first pixel of the crack without skeleton in S4.2, obtain the coordinates of the crack skeleton pixel in S4.1 closest to the first pixel and the distance value one between the pixel and the first pixel; establish a line one between the first pixel and the crack skeleton pixel, and change the value of the pixel covered by the line one in the marker array 1 to the obtained distance value one;
[0026] S4.4: Select the second pixel of the crack in S4.2 with the skeleton removed, obtain the coordinates of the crack skeleton pixel closest to the second pixel and the distance value two between it and the second pixel; establish line two between the second pixel and this skeleton pixel, change the values of the pixels in marker array 1 that are covered by line two and not covered by line one in S4.3 to the obtained distance value two; change the values of the pixels in marker array 1 that are covered by line two and covered by line one in S4.3 to the larger of distance value one and distance value two.
[0027] S4.5: Select the third pixel of the crack in S4.2 with the skeleton removed, obtain the coordinates of the crack skeleton pixel closest to the third pixel and the distance value three between the third pixel and the third pixel; then establish a connection three between the third pixel and the skeleton pixel, change the value of the pixel covered by the connection three and not covered by the connection one or the connection two in the marking array 1 to the distance value three; change the value of the pixel covered by the connection three and covered by the connection one or the connection two in the marking array 1 to the larger one of the distance value three and the distance value one or the distance value two;
[0028] S4.6: Repeat the processing methods from S4.3 to S4.5, traverse other pixels of the part where the cracks are removed from the skeleton, and obtain the final label array 1.
[0029] Preferably, when obtaining the crack skeleton in step S4.1, it is necessary to limit the minimum skeleton branch length to avoid burrs on the obtained skeleton.
[0030] Preferably, the step S5 specifically includes:
[0031] S5.1: Obtain the crack edge line;
[0032] S5.2: Obtain the coordinates of the portion of the crack removal edge line and its pixels; create a blank array with the same size as the binary value, recorded as marker array 2;
[0033] S5.3: Find the first pixel A of the portion of the edge line where the crack is removed, obtain the coordinates of the edge line pixel closest to the first pixel A and the distance value A between the pixel and the first pixel A, establish a line A between the first pixel A and the edge line pixel, and change the value of the pixel covered by the line A in the marker array 2 to the distance value A;
[0034] S5.4 find the second pixel A of the portion of the edge line where the crack is removed, obtain the coordinates of the edge line pixel closest to the second pixel A and the distance value B between the pixel and the second pixel A, establish a line B between the second pixel A and the edge line pixel, change the values of the pixels covered by the line B and not covered by the line A in the marker array 2 to the distance value B; change the values of the pixels covered by the line B and already covered by the line A in the marker array 2 to the larger of the distance value B and the existing distance value A;
[0035] S5.5 find the third pixel A of the portion of the edge line where the crack is removed, obtain the coordinates of the edge line pixel closest to the third pixel A and the distance value C between the pixel and the third pixel A, then establish a line C between the third pixel A and the edge line pixel, change the values of the pixels in the marker array 2 that are covered by the line C and not covered by the line A or the line B to the distance value C; change the values of the pixels in the marker array 2 that are covered by the line C and covered by the line A or the line B to the larger one of the distance value C and the distance value A or the distance value B;
[0036] S5.6 Repeat the processing methods from S5.3 to S5.5, traverse other pixels of the crack removal edge line portion, and obtain the final marking array 2.
[0037] Preferably, in step S7, the visual measurement result is obtained by using color scaling, and the color mapped to the obtained value 0 is replaced with white.
[0038] The beneficial effects of the present invention are:
[0039] (1) The present invention works based on computer programming and is combined with image acquisition equipment; it is efficient, convenient and portable;
[0040] (2) The result visualization of the present invention: the width of each crack is obtained intuitively and vividly by combining color mapping and the color bar showing the color scale, that is, one color represents one width value;
[0041] (3) The calculation results of the present invention are authentic and reliable: the camera's working distance is measured, and the pixel accuracy is calculated in combination with the focal length, so the result is more accurate;
[0042] (4) The method of the present invention is convenient and fast: it works based on image acquisition equipment and distance measuring instruments, and the instrument is easy to set up;
[0043] (5) The calculation results of the present invention are more comprehensive: the actual values of the actual length of the crack, the actual area of the crack and the average width of the crack can be obtained.
[0044] (6) The measurement of the present invention adopts the line covering method to obtain pixel coordinates, which can make the array elements of the obtained pixels more accurate, thereby making the actual value of the measurement more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] 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.
[0046] Figure 1 The overall workflow of the present invention;
[0047] Figure 2 Crack image after edge amplification;
[0048] Figure 3 Fracture skeleton image;
[0049] Figure 4 crack-removed skeleton image;
[0050] Figure 5 Image of the edge of the crack;
[0051] Figure 6 Cracks remove edge parts of the image; DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] like Figure 1-6 As shown, this example provides a visual measurement method for apparent crack geometric parameters. In order to carry out the work quickly, conveniently and reliably, this embodiment is based on Matlab programming to realize the whole process of measurement. The measurement work is carried out after the image of the target area is obtained by the image acquisition device under the same working conditions and the laser rangefinder is used to obtain the camera working distance:
[0054] S1: Image acquisition and distance measurement: To carry out the measurement work quickly, conveniently and reliably, first adjust the camera to a working distance with the main optical axis parallel to the normal line of the collected surface and with a suitable length. Use the camera to capture and obtain the image of the target area while keeping the current relative angle and working distance unchanged. At the same time, use a distance measuring instrument such as a computing rangefinder to measure the camera working distance L;
[0055] S2: Image preprocessing and image segmentation; first use the library function rgb2gray to convert the acquired color image into a grayscale image, and then use medfilt2 to perform median filtering on the image to reduce the noise in the image; then use adaptthresh to obtain the adaptive image segmentation threshold of the local first-order statistic, and use it to perform image segmentation; finally, obtain a logical array of the same size as the image (each element is set to 1), obtain the array index of the pixels in the image whose grayscale is higher than the threshold, and set the element corresponding to the index in the logical array to 0; at this time, the logical array is the image segmentation result: the part with an element of 1 refers to the crack, and the part with an element of 0 refers to the matrix; in order to avoid direct contact between the crack and the edge of the image, obtain the width and height of the logical array as c and d, obtain a logical array with a width of c+2, a height of d+2, all elements are 0 and named bwima, and assign the part of rows 2 to c+1 and columns 2 to d+1 in bwima to the logical array representing the image segmentation result, such as Figure 2 ;
[0056] S3: Get pixel accuracy: The image pixel accuracy is calculated as follows:
[0057]
[0058]
[0059]
[0060]
[0061] Wcamera and Hcamera are the width and height of the camera target surface, f is the focal length of the camera, H and W are the height and width of the camera field of view; a and b are the number of pixels of the image in the width and height directions; w and h are the pixel accuracy of the image in the width and height directions; during work, the aspect ratio of the camera target surface is equal to the ratio of the number of pixels in the width and height directions of the image, so w = h;
[0062] S4: Obtain pixels of the crack-removed skeleton region, obtain the coordinates of the crack skeleton pixel closest to the pixel of the crack-removed skeleton region and the distance value between the nearest crack skeleton pixel and the pixel of the crack-removed skeleton region, traverse the pixels of the crack-removed skeleton portion, and obtain the corresponding label array using a line covering method;
[0063] Specifically:
[0064] S4.1: Use bwskel to obtain a crack skeleton with a width of 1 pixel. To avoid burrs, the minimum skeleton length is limited. The obtained array is named bw1. The elements of bw1 that are 1 represent the crack skeleton. Get the number of pixels representing the crack, n, that is, the number of pixels with a value of 1 in bwima. Get the crack skeleton length 1, that is, use bwmorph to get half of the circumference of the crack skeleton. The actual value of the average crack width d, the actual value of the crack area S, and the actual crack length Lcrack are calculated as follows:
[0065]
[0066] S=n×w×w (6)
[0067] L crack =l×w (7)
[0068] S4.2: Subtract bw1 from bwima and name the obtained array bw2. The elements of bw2 that are 1 are the parts of the cracks without the skeleton. Get the coordinate set of the elements with a value of 1 in bw2 and name it xy2. Create an array with the same size as bwima and all values 0, named widthmap (considered as marker array 1).
[0069] S4.3: First, select the first pixel of the crack without the skeleton, that is, obtain the first value of xy2 as its coordinates, use bwdist to obtain the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map1; then obtain the minimum value in the part corresponding to the crack skeleton in s2o_map1 and obtain its row and column coordinates, that is, obtain the distance to the skeleton closest to the pixel and the coordinates of the skeleton pixel; then establish a line between the pixel and the skeleton pixel, and change the pixel value covered by the line in widthmap to the minimum value of the distance; finally, change all element values of s2o_map1 to 0;
[0070] S4.4 First, select the second pixel of the crack without the skeleton, that is, obtain the second value of xy2 as its coordinate, use bwdist to obtain the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map1; then obtain the minimum value in the part corresponding to the crack skeleton in s2o_map1 and obtain its row and column coordinates, that is, obtain the distance to the skeleton closest to the pixel and the coordinates of the skeleton pixel; then establish a line between the pixel and the skeleton pixel, and the value of the pixel covered by the line and not marked in the widthmap is changed to the minimum value of the distance; the value of the pixel covered by the line and marked in the widthmap is changed to the larger of the minimum value of the distance and the existing marked value; finally, all element values of s2o_map1 are changed to 0;
[0071] S4.5 First, select the third pixel of the crack without skeleton, that is, obtain the third value of xy2 as its coordinate, use bwdist to obtain the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map1; then obtain the minimum value in the part corresponding to the crack skeleton in s2o_map1 and obtain its row and column coordinates, that is, obtain the value of the pixel covered by the line and not marked in the widthmap of the image and change it to the minimum value of the distance; the distance to the nearest skeleton covered by the line in the widthmap and the coordinates of the skeleton pixel; then establish a line between the pixel and the skeleton pixel, and change the value of the pixel covered and marked to the larger of the minimum value of the distance and the existing marked value; finally, change all element values of s2o_map1 to 0;
[0072] S4.6 traverses other pixels of the crack removed skeleton portion, i.e. repeats the processing methods of S3.3 to S3.5; S5: obtains pixels of the crack removed edge region, obtains the coordinates of the edge line pixels closest to the pixels of the crack removed edge region and the distance value between the nearest edge line pixels and the pixels of the crack removed edge region, traverses the pixels of the crack removed edge line portion, and obtains the corresponding label array using the line coverage method;
[0073] Specifically:
[0074] S5.1: Use bwmorph to obtain the crack edge line with a width of 1 pixel. The obtained array is named bw3. The element with a value of 1 in bw3 represents the crack edge line.
[0075] S5.2: Subtract bw3 from bwima and name the obtained array bw4. The elements of bw4 that are 1 are the parts of the crack removal edge line. Get the coordinate set of the elements with a value of 1 in bw4 and name it xy4. Create an array with the same size as bwima and all values 0, named widthmap2 (regarded as marker array 2).
[0076] S5.3: First, select the first pixel of the crack without edge line, that is, get the first value of xy4 as its coordinate, use bwdist to get the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map2; then get the minimum value in the part corresponding to the crack edge line in s2o_map2 and get its row and column coordinates, that is, get the coordinates and distance value of the edge line pixel closest to the pixel; then establish a line between the pixel and the edge line pixel, change the value of the pixel covered by the line in widthmap to the minimum value of the distance; finally, change all element values of s2o_map2 to 0;
[0077] S5.4 First, select the second pixel of the part where the crack removes the edge line, that is, obtain the second value of xy4 as its coordinates, use bwdist to obtain the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map2; then obtain the minimum value in the part corresponding to the crack edge line in s2o_map2 and obtain its row and column coordinates, that is, obtain the distance to the edge line pixel closest to the pixel and the coordinates of the skeleton pixel; then establish a line between the pixel and the edge line pixel, and the value of the pixel covered by the line and not marked in widthmap2 is changed to the minimum value of the distance; the value of the pixel covered by the line and marked in widthma2 is changed to the larger of the minimum value of the distance and the existing marked value; finally, all element values of s2o_map2 are changed to 0;
[0078] S5.5 First, select the third pixel of the part where the crack removes the edge line, that is, obtain the third coordinate of xy4 as its coordinate, use bwdist to obtain the distance between the remaining pixels in the image and the pixel, and the array used to record the distance value is named s2o_map2; then obtain the minimum value in the part corresponding to the crack skeleton in s2o_map2 and obtain its row and column coordinates, that is, obtain the coordinate set distance value of the edge line pixel closest to the pixel; then establish a line between the pixel and the edge line pixel, and the value of the pixel covered by the line and not marked in widthmap2 is changed to the minimum value of the distance; the value of the pixel covered by the line and marked in widthmap2 is changed to the larger of the minimum value of the distance and the existing marked value; finally, all element values of s2o_map are changed to 0;
[0079] S5.6 traverses the other pixels of the part where the skeleton is removed from the crack, i.e. repeats the processing methods from S3.3 to S3.5; S6 merges the marker array 1 and the marker array 2, and replaces the elements in the marker array 1 that are smaller than the marker array 2 with the marker array 2: compares the values of each element of the two, i.e. traverses each position in the two arrays, if the widthmap1 at this position is smaller than the widthmap2, then the value of the widthmap1 element here is changed to the value of the widthmap2 element; if the widthmap1 at this position is greater than or equal to the widthmap2, then it remains unchanged; finally, multiply each pixel of the widthmap1 by w, i.e. replaces the pixel distance with the actual distance, at this time, the part corresponding to the crack of the widthmap1 records the width value, and the part outside the crack is 0;
[0080] S7 color mapping and export of measurement results: use imagesc to map the distance values recorded by each element to colors; specifically, the mapping range is from 0 to the maximum value in widthmap1; then use colorbar to display the color bar to indicate the mapping of data values to the color map; then use exportgraphics to export the current window content; for ease of display and viewing, replace the color mapped by the value 0 (i.e., the matrix part) with white in the saved image, and the image after color replacement is the desired crack width visualization result; at this point, the width visualization measurement result is obtained.
[0081] This embodiment works based on computer programming and combines with image acquisition equipment; it is efficient, convenient and portable; it cooperates with color mapping and a color bar that displays color levels to intuitively and vividly obtain the width of each crack, that is, one color represents a width value; the measurement result is more real and reliable: the camera imaging working distance is measured, and the pixel accuracy is calculated in combination with the focal length, and the result is more accurate; the method is convenient and fast: it works based on image acquisition equipment and distance measuring instruments, and the instrument is easy to set up; the measurement result is more comprehensive: it can obtain the actual value of the actual length of the crack, the actual area of the crack and the average width of the crack.
[0082] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for visually measuring apparent crack geometric parameters, characterized in that: The following steps are involved: S1: Perform image acquisition and distance measurement; first adjust the camera so that the main optical axis is parallel to the normal line of the acquired surface and a working distance is left, and use the camera to capture and obtain the image of the target area while keeping the current relative angle and working distance unchanged, and use a distance measuring instrument to measure the camera working distance L; S2: Perform image preprocessing and image segmentation; first convert the color image obtained in S1 into a grayscale image, then use image filtering to reduce the noise in the image; then use the image segmentation method to obtain a binary image with the cracks segmented out; then amplify the edge of the binary image by a circle of pixels representing the matrix; S3: Obtain pixel accuracy; based on the camera working distance L, the image pixel accuracy calculation formula is as follows: Where: W camera and H camera is the width and height of the camera target surface, f is the focal length of the camera, H and W are the height and width of the camera field of view respectively; a and b are the number of pixels of the image in the width and height directions respectively; w and h are the pixel accuracy of the image in the width and height directions respectively; S4: Obtain pixels of the crack-removed skeleton region, obtain the coordinates of the crack skeleton pixel closest to the pixel of the crack-removed skeleton region and the distance value between the nearest crack skeleton pixel and the pixel of the crack-removed skeleton region, traverse the pixels of the crack-removed skeleton portion, and obtain the corresponding label array using a line covering method; S5: Obtain pixels in the crack removed edge region, obtain the coordinates of edge line pixels closest to the pixels in the crack removed edge region and the distance value between the nearest edge line pixels and the pixels in the crack removed edge region, traverse the pixels in the crack removed edge line portion, and obtain the corresponding label array using a line coverage method; S6: merge the arrays annotated by S4 and S5; replace the elements in the array annotated by S4 that are smaller than those in the array annotated by S5 with the corresponding elements in the array annotated by S5; then multiply each element of the array annotated by S4 after replacement by the pixel accuracy w of the image in the width direction in S3, and replace the pixel distance with the actual distance; S7: Color mapping and measurement result export; use color scaling on the actual distance array obtained in S6 to obtain the visualized measurement result and export the current window content width. The visualization measurement result is obtained.
2. A method for visually measuring apparent crack geometric parameters according to claim 1, characterized in that: In step S3, the ratio of the camera target surface width to height is equal to the ratio of the number of pixels in the image width and height directions, w=h.
3. A method for visually measuring apparent crack geometric parameters according to claim 1, characterized in that: The step S4 specifically includes: S4.1: Obtain the crack skeleton; obtain the number of pixels n representing the crack and the pixel length l of the crack skeleton; combine the pixel accuracy w of the image in the width direction in S3 to calculate the actual value of the average crack width d, the actual crack length Lcrack and the actual crack area S; the calculation formula is as follows: S=n×w×w (6) L crack =l×w (7) S4.2: Obtain the portion of the crack-removed skeleton, and obtain a set of coordinates of pixels of the crack-removed skeleton; and establish a blank array of the same size as the binary image for recording the marking values, recorded as marking array 1; S4.3: Select the first pixel of the crack without skeleton in S4.2, obtain the coordinates of the crack skeleton pixel in S4.1 closest to the first pixel and the distance value one between the pixel and the first pixel; establish a line one between the first pixel and the crack skeleton pixel, and change the value of the pixel covered by the line one in the marker array 1 to the obtained distance value one; S4.4: Select the second pixel of the crack in S4.2 with the skeleton removed, obtain the coordinates of the crack skeleton pixel closest to the second pixel and the distance value 2 between the pixel and the second pixel; establish a second connection line between the second pixel and the skeleton pixel, change the values of the pixels in the marker array 1 that are covered by the second connection line and not covered by the first connection line in S4.3 to the obtained distance value 2; change the values of the pixels in the marker array 1 that are covered by the second connection line and covered by the first connection line in S4.3 to the larger of the distance value 1 and the distance value 2; S4.5: Select the third pixel of the crack in S4.2 with the skeleton removed, obtain the coordinates of the crack skeleton pixel closest to the third pixel and the distance value three between the third pixel and the third pixel; then establish a connection three between the third pixel and the skeleton pixel, change the value of the pixel covered by the connection three and not covered by the connection one or the connection two in the marking array 1 to the distance value three; change the value of the pixel covered by the connection three and covered by the connection one or the connection two in the marking array 1 to the larger one of the distance value three and the distance value one or the distance value two; S4.6: Repeat the processing methods from S4.3 to S4.5, traverse other pixels of the part where the cracks are removed from the skeleton, and obtain the final label array 1.
4. A visual measurement method for apparent crack geometric parameters according to claim 3, characterized in that: When obtaining the crack skeleton in step S4.1, it is necessary to limit the minimum skeleton branch length to avoid burrs on the obtained skeleton.
5. A method for visually measuring apparent crack geometric parameters according to claim 1, characterized in that: The step S5 specifically includes: S5.1: Obtain the crack edge line; S5.2: Obtain the coordinates of the portion of the crack removal edge line and its pixels; create a blank array with the same size as the binary value, recorded as marker array 2; S5.3: Find the first pixel A of the portion of the edge line where the crack is removed, obtain the coordinates of the edge line pixel closest to the first pixel A and the distance value A between the pixel and the first pixel A, establish a line A between the first pixel A and the edge line pixel, and change the value of the pixel covered by the line A in the marker array 2 to the distance value A; S5.4 finds the second pixel A of the portion of the edge line where the crack is removed, obtains the coordinates of the edge line pixel closest to the second pixel A and the distance value B between the pixel and the second pixel A, establishes a line B between the second pixel A and the edge line pixel, changes the values of the pixels covered by the line B and not covered by the line A in the marker array 2 to the distance value B; changes the values of the pixels covered by the line B and already covered by the line A in the marker array 2 to the larger one between the distance value B and the existing distance value A; S5.5 find the third pixel A of the portion of the edge line where the crack is removed, obtain the coordinates of the edge line pixel closest to the third pixel A and the distance value C between the pixel and the third pixel A, then establish a line C between the third pixel A and the edge line pixel, change the values of the pixels in the marker array 2 that are covered by the line C and not covered by the line A or the line B to the distance value C; change the values of the pixels in the marker array 2 that are covered by the line C and covered by the line A or the line B to the larger one of the distance value C and the distance value A or the distance value B; S5.6 Repeat the processing methods from S5.3 to S5.5, traverse other pixels of the crack removal edge line portion, and obtain the final marking array 2.
6. A method for visually measuring apparent crack geometric parameters according to claim 1, characterized in that: In the step S7, the visual measurement result is obtained by using color scaling, and the color mapped by the obtained value 0 is replaced with white.
Citation Information
Patent Citations
Three-dimensional rock core visualization method based on CT images
CN103971410A
Identifier for crack width measurement and method of use
CN111652923A