A crack identification method and system based on image processing
By acquiring the overlapping images to calculate the parallax map and extracting features, the problem of low accuracy and efficiency of crack recognition in the prior art is solved, and high-precision crack recognition and width measurement are achieved.
Patent Information
- Application Number
- CN202510134556.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-07
AI Technical Summary
The prior art has low accuracy and efficiency in crack identification, especially in computer vision systems based on single image analysis, making it difficult to effectively identify and measure the location and width of cracks.
By acquiring the first pavement image and the second pavement image (at least 50% overlap), the disparity map is calculated and the depth map is obtained, and then normalization and feature extraction are performed, including HOG features and geometric features, and the feature vectors are fused to the classification model to identify the crack type and calculate the width.
High-precision identification and width measurement of road surface cracks are realized, and the accuracy and efficiency of crack detection are improved by restoring the three-dimensional model of the road surface.
Smart Images

Figure CN119559186B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a crack identification method and system based on image processing. Background Art
[0002] In the maintenance and management of infrastructure, the safety and durability of roads and bridges are crucial considerations. Cracks are an important indicator of the health of the structure. Their presence not only affects the appearance, but may also indicate potential safety hazards. Cracks exist in various forms, which can be manifested as network (block) cracks, cracks, longitudinal cracks, and transverse cracks. These cracks have different shapes and complex causes. They may be the result of design defects, substandard construction quality, insufficient material performance, or environmental effects. Over time, cracks may expand, thereby weakening the overall strength and stability of the structure, increasing maintenance costs, and posing a threat to public safety. Therefore, regular and systematic inspection and evaluation of the crack condition of bridges and roads has become a key link in ensuring the normal operation of transportation facilities. Accurately locating the location of cracks, measuring the width, and recording development trends are crucial to assessing the extent of damage and formulating reasonable maintenance strategies.
[0003] However, traditional crack detection methods usually rely on manual visual inspection or simple instrument assistance, which is inefficient and prone to omissions. In recent years, the development of computer vision technology has provided new possibilities for automated crack detection. Nevertheless, the current computer vision system based on single image analysis still needs to be improved in terms of crack identification accuracy. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a crack identification method and system based on image processing, which are used to solve the technical problems in the prior art.
[0005] On the one hand, the invention provides the following technical solution, a crack identification method based on image processing, the method comprising:
[0006] Acquire a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%;
[0007] Comparing the position differences of corresponding pixels of the first road surface image and the second road surface image to form a disparity map, and calculating a depth map based on the disparity map;
[0008] Normalizing the depth map to convert it into a grayscale image, extracting HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle of the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle;
[0009] The HOG features and geometric features are fused to form a feature vector, and the feature vector is input into a classification model to output the type of the crack, and the width of the crack is calculated according to the type of the crack using a width calculation process.
[0010] Compared with the prior art, the beneficial effects of the present application are as follows: by obtaining the first road surface image and the second road surface image, similar to the two eyes of a person obtaining the image of the scene, and then forming a disparity map based on the position difference of the corresponding pixel points of the first road surface image and the second road surface image, and calculating the depth map based on the disparity map, the depth information of the distance of all pixel points of the depth map from the optical center of the camera can be effectively obtained, and the three-dimensional model of the road surface can be restored based on this, thereby improving the accuracy of subsequent calculation of road surface cracks.
[0011] Furthermore, the steps of respectively acquiring the first road surface image and the second road surface image include:
[0012] Install two shooting devices on the mobile device, and use a calibration method to calculate the external parameters of the shooting devices, wherein the external parameters include a first rotation matrix and a first translation vector;
[0013] Decomposing the first rotation matrix to obtain two second rotation matrices, and respectively rotating the original images acquired by the two photographing devices according to the two second rotation matrices so that the planes of the two original images are parallel;
[0014] Creating a transformation matrix, and redefining the coordinate systems of the two photographing devices based on the transformation matrix, wherein a line connecting the two photographing devices of the redefined coordinate system is parallel to the rotated original image;
[0015] The first road surface image and the second road surface image are obtained respectively by calculating based on the transformation matrix, the two second rotation matrices and the redefined coordinate system using a transformation formula.
[0016] Furthermore, the transformation formula includes:
[0017]
[0018] in, Represented as the first road surface image, Represented as the second road image, represents an original image obtained by one of the shooting devices, represents the original image obtained by the second shooting device, Expressed as the first rotation matrix, and Respectively expressed as two second rotation matrices, , It is represented as the second translation vector between the projection centers of the two shooting devices, Expressed as The cross product with the principal optical axis of the camera, Expressed as and The outer product of is transposed.
[0019] Furthermore, the step of comparing the position differences of corresponding pixels of the first road surface image and the second road surface image to form a disparity map, and calculating a depth map based on the disparity map includes:
[0020] Performing stereo matching using a stereo matching algorithm to find out the same pixels between the first road surface image and the second road surface image;
[0021] Calculating the disparity value of each pixel point to generate a disparity map;
[0022] A depth value of each pixel is calculated, and the pixel value of the pixel is replaced by the depth value, so that the disparity map is converted into a depth map.
[0023] Furthermore, the step of inputting the feature vector into a classification model to output the type of cracks includes:
[0024] Reading feature vector information of the feature vector, and inputting the feature vector information into a first classifier, so that the first classifier determines whether the crack is a regular crack;
[0025] If the crack is a regular crack, the feature vector information is input into the second classifier, so that the second classifier determines whether the crack is a transverse crack or a longitudinal crack.
[0026] Furthermore, the width calculation process includes:
[0027] Traversing the crack to obtain coordinates of multiple target points between the starting point and the end point of the crack;
[0028] Calculating the slope of the crack using the coordinates of two consecutive target points, and obtaining a normal line of the crack based on the slope;
[0029] Using an edge detector to identify the edge of the crack, traversing the edge of the crack along the position of the normal line, and obtaining the coordinates of two points where the crack intersects with the normal line;
[0030] Calculate the distance between the two intersecting points to obtain the width of the crack;
[0031] The slope of the crack of the coordinates of the next two consecutive target points is calculated until all the consecutive two target points are calculated, and the maximum width of the crack is obtained based on the obtained widths of all the cracks.
[0032] Furthermore, after the step of obtaining the grayscale image, the method further includes:
[0033] Calculating the depth of the crack in the grayscale image using a depth calculation formula;
[0034] The depth calculation formula includes:
[0035] ;
[0036] in, is the depth of the crack, is the depth value of the pixel point in the crack formation domain of the grayscale image, is the depth value of the pixel point in the domain formed outside the crack of the grayscale image, is the number of pixels in the domain formed by the cracks of the grayscale image.
[0037] In a second aspect, the invention provides the following technical solution: a crack identification system based on image processing, the system comprising:
[0038] An acquisition module, used to acquire a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%;
[0039] A calculation module, configured to compare the position difference of corresponding pixels between the first road surface image and the second road surface image to form a disparity map, and calculate a depth map based on the disparity map;
[0040] An extraction module, configured to perform normalization processing on the depth map to convert it into a grayscale image, and extract HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle of the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle;
[0041] The output module is used to fuse the HOG features and geometric features to form a feature vector, and input the feature vector into a classification model to output the type of the crack, and calculate the width of the crack according to the type of the crack using a width calculation process.
[0042] In a third aspect, the invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image processing-based crack identification method when executing the computer program.
[0043] In a fourth aspect, the invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned crack identification method based on image processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 labor.
[0045] Figure 1 A flowchart of a crack identification method based on image processing provided by a first embodiment of the present invention;
[0046] Figure 2 A structural block diagram of a crack identification system based on image processing provided by a second embodiment of the present invention;
[0047] Figure 3 A schematic diagram of the hardware structure of a computer provided for the third embodiment of the present invention.
[0048] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout are the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.
[0050] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0052] Embodiment 1
[0053] In the first embodiment of the present invention, see Figure 1 As shown, a crack identification method based on image processing includes the following steps S01 to S04:
[0054] S01, acquiring a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%;
[0055] Specifically, the steps of respectively acquiring the first road surface image and the second road surface image include:
[0056] Install two shooting devices on the mobile device, and use a calibration method to calculate the external parameters of the shooting devices, wherein the external parameters include a first rotation matrix and a first translation vector;
[0057] Decomposing the first rotation matrix to obtain two second rotation matrices, and respectively rotating the original images acquired by the two photographing devices according to the two second rotation matrices so that the planes of the two original images are parallel;
[0058] Creating a transformation matrix, and redefining the coordinate systems of the two photographing devices based on the transformation matrix, wherein a line connecting the two photographing devices of the redefined coordinate system is parallel to the rotated original image;
[0059] The first road surface image and the second road surface image are obtained respectively by calculating based on the transformation matrix, the two second rotation matrices and the redefined coordinate system using a transformation formula.
[0060] More specifically, the transformation formula includes:
[0061]
[0062] in, Represented as the first road surface image, Represented as the second road image, represents an original image obtained by one of the shooting devices, represents the original image obtained by the second shooting device, Expressed as the first rotation matrix, , It is represented as the second translation vector between the projection centers of the two shooting devices, Expressed as The cross product with the principal optical axis of the camera, Expressed as and The outer product of is the transpose. Among them, and Respectively expressed as two second rotation matrices, is the transformation matrix.
[0063] In this embodiment, the mobile device may be a drone or a car. The shooting device is a camera. The calibration method is the Zhang Zhengyou calibration method. Decomposing the first rotation matrix to obtain two second rotation matrices is to perform positive square root and negative square root processing on the first rotation matrix R respectively to obtain the first second rotation matrix and the second second rotation matrix .
[0064] It is worth noting that obtaining the first road surface image and the second road surface image refers to a technology of using two cameras (similar to a person's two eyes) to acquire images of a scene, and acquiring depth information and a three-dimensional structure of the scene by analyzing the difference between the two images.
[0065] S02, comparing position differences between corresponding pixel points of the first road surface image and the second road surface image to form a disparity map, and calculating a depth map based on the disparity map;
[0066] Specifically, the step of comparing the position difference of corresponding pixel points of the first road surface image and the second road surface image to form a disparity map, and calculating the depth map based on the disparity map includes:
[0067] Performing stereo matching using a stereo matching algorithm to find out the same pixels between the first road surface image and the second road surface image;
[0068] Calculating the disparity value of each pixel point to generate a disparity map;
[0069] A depth value of each pixel is calculated, and the pixel value of the pixel is replaced by the depth value, so that the disparity map is converted into a depth map.
[0070] In this embodiment, the stereo matching algorithm may be a SGBM (Semi-Global Block Matching) algorithm.
[0071] It is worth noting that the steps of obtaining the first road surface image and the second road surface image are similar to using a person's two eyes to obtain an image of a scene, and then forming a disparity map based on comparing the position differences of corresponding pixel points of the first road surface image and the second road surface image, and calculating the depth map based on the disparity map. This can effectively obtain the depth information of the distance between all pixel points of the depth map and the optical center of the camera, and can be used to restore the three-dimensional model of the road surface, thereby improving the accuracy of subsequent calculations of road surface cracks.
[0072] S03, normalizing the depth map to convert it into a grayscale image, extracting HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle of the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle;
[0073] In this embodiment, the depth information of the depth map is expanded to the grayscale information range of [0, 255] to obtain a grayscale image with a value range of [0, 255]. HOG (Histogram of Oriented Gradients). The minimum bounding rectangle (MBR) refers to the minimum rectangular area surrounding a set of two-dimensional points so that all points are contained in this rectangle. This rectangle does not have to be aligned with the coordinate axes and can have any rotation angle. In computational geometry and computer vision, the minimum bounding rectangle is a common concept used for object boundary detection, shape analysis, and spatial data indexing.
[0074] S04, fusing the HOG features and geometric features to form a feature vector, and inputting the feature vector into a classification model to output the type of the crack, and calculating the width of the crack according to the type of the crack using a width calculation process.
[0075] Specifically, the step of inputting the feature vector into a classification model to output the type of crack includes:
[0076] Reading feature vector information of the feature vector, and inputting the feature vector information into a first classifier, so that the first classifier determines whether the crack is a regular crack;
[0077] If the crack is a regular crack, the feature vector information is input into the second classifier, so that the second classifier determines whether the crack is a transverse crack or a longitudinal crack.
[0078] In this embodiment, the classification model, the first classifier, and the second classifier are all SVMs. SVM (Support Vector Machine) is a powerful classification model.
[0079] Specifically, the width calculation process includes:
[0080] S41, if the crack is a transverse crack or a longitudinal crack, traverse the crack to obtain the coordinates of multiple target points between the starting point and the end point of the crack ;
[0081] S42, calculating the slope of the crack using the coordinates of two consecutive target points, , based on the slope, the normal line of the crack is obtained, where the equation of the normal line is , ;
[0082] S43, using an edge detector to identify the edge of the crack, traversing the edge of the crack along the position of the normal line, and obtaining the coordinates of two points where the crack intersects with the normal line , ;
[0083] Calculate the distance between the two intersection points to get the width of the crack, ;
[0084] S44, calculating the slope of the crack of the coordinates of the next two consecutive target points, until all the consecutive two target points are calculated, and obtaining the maximum width of the crack based on the obtained widths of all the cracks.
[0085] Specifically, after the step of obtaining the grayscale image, the method further includes:
[0086] Calculating the depth of the crack in the grayscale image using a depth calculation formula;
[0087] The depth calculation formula includes:
[0088] ;
[0089] is the depth of the crack, is the depth value of the pixel point in the crack formation domain of the grayscale image, is the depth value of the pixel point in the domain formed outside the crack of the grayscale image, is the number of pixels in the domain formed by the cracks of the grayscale image.
[0090] In summary, a crack identification method based on image processing has the following effects:
[0091] By obtaining the first road surface image and the second road surface image, similar to the two eyes of a person obtaining an image of a scene, and then forming a disparity map based on the position difference of corresponding pixel points of the first road surface image and the second road surface image, and calculating the depth map based on the disparity map, the depth information of the distance of all pixel points of the depth map from the optical center of the camera can be effectively obtained, and the three-dimensional model of the road surface can be restored based on this, thereby improving the accuracy of subsequent calculation of road surface cracks.
[0092] Embodiment 2
[0093] like Figure 2 As shown, in a second embodiment of the present invention, a crack identification system based on image processing is provided, and the system comprises:
[0094] An acquisition module 10, for acquiring a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%;
[0095] A calculation module 20, configured to compare the position difference of corresponding pixels between the first road surface image and the second road surface image to form a disparity map, and calculate a depth map based on the disparity map;
[0096] An extraction module 30 is used to perform normalization processing on the depth map to convert it into a grayscale image, and extract HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle obtained by the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle;
[0097] The output module 40 is used to fuse the HOG features and geometric features to form a feature vector, and input the feature vector into a classification model to output the type of the crack, and calculate the width of the crack according to the type of the crack using a width calculation process.
[0098] The crack identification system based on image processing provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0099] Embodiment 3
[0100] like Figure 3As shown, in the third embodiment of the present invention, the embodiment of the present invention provides the following technical solution, a computer, including a memory 202, a processor 201, and a computer program stored in the memory 202 and executable on the processor 201, and the processor 201 implements the above-mentioned image processing-based crack identification method when executing the computer program.
[0101] Specifically, the processor 201 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0102] Among them, the memory 202 may include a large-capacity memory for data or instructions. For example, but not limitation, the memory 202 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 202 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 202 may be inside or outside the data processing device. In a specific embodiment, the memory 202 is a non-volatile memory. In a specific embodiment, the memory 202 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0103] The memory 202 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 201 .
[0104] The processor 201 implements the above-mentioned crack identification method based on image processing by reading and executing computer program instructions stored in the memory 202 .
[0105] In some embodiments, the computer may further include a communication interface 203 and a bus 200. Figure 3 As shown, the processor 201, the memory 202, and the communication interface 203 are connected via a bus 200 and communicate with each other.
[0106] The communication interface 203 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication interface 203 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0107] The bus 200 includes hardware, software or both, and couples the components of the computer to each other. The bus 200 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 200 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 200 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0108] Embodiment 4
[0109] In the fourth embodiment of the present invention, in combination with the above-mentioned crack identification method based on image processing, the embodiment of the present invention provides the following technical solution, a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned crack identification method based on image processing is implemented.
[0110] Those skilled in the art will appreciate that the logic and / or steps described in the flowchart as data or in other ways herein, for example, can be considered as a sequenced data table of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses.
[0111] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0112] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0113] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A crack identification method based on image processing, characterized in that: The method comprises: Acquire a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%; Comparing the position differences of corresponding pixels of the first road surface image and the second road surface image to form a disparity map, and calculating a depth map based on the disparity map; Normalizing the depth map to convert it into a grayscale image, extracting HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle of the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle; The HOG features and geometric features are combined to form a feature vector, and the feature vector is input into a classification model to output the type of the crack, and the width of the crack is calculated according to the type of the crack using a width calculation process; The width calculation process includes: Traversing the crack to obtain coordinates of multiple target points between the starting point and the end point of the crack; Calculating the slope of the crack using the coordinates of two consecutive target points, and obtaining a normal line of the crack based on the slope; Using an edge detector to identify the edge of the crack, traversing the edge of the crack along the position of the normal line, and obtaining the coordinates of two points where the crack intersects with the normal line; Calculate the distance between the two intersecting points to obtain the width of the crack; The slope of the crack of the coordinates of the next two consecutive target points is calculated until all the consecutive two target points are calculated, and the maximum width of the crack is obtained based on the obtained widths of all the cracks.
2. The crack identification method based on image processing according to claim 1, characterized in that: The steps of respectively acquiring the first road surface image and the second road surface image include: Install two shooting devices on the mobile device, and use a calibration method to calculate the external parameters of the shooting devices, wherein the external parameters include a first rotation matrix and a first translation vector; Decomposing the first rotation matrix to obtain two second rotation matrices, and respectively rotating the original images acquired by the two photographing devices according to the two second rotation matrices so that the planes of the two original images are parallel; Creating a transformation matrix, and redefining the coordinate systems of the two photographing devices based on the transformation matrix, wherein a line connecting the two photographing devices of the redefined coordinate system is parallel to the rotated original image; The first road surface image and the second road surface image are obtained respectively by calculating based on the transformation matrix, the two second rotation matrices and the redefined coordinate system using a transformation formula.
3. The crack identification method based on image processing according to claim 2 is characterized in that: The transformation formula includes: in, Represented as the first road surface image, Represented as the second road image, represents an original image obtained by one of the shooting devices, represents the original image obtained by the second shooting device, Expressed as the first rotation matrix, and Respectively expressed as two second rotation matrices, , It is represented as the second translation vector between the projection centers of the two shooting devices, Expressed as The cross product with the principal optical axis of the camera, Expressed as and The outer product of is transposed.
4. The crack identification method based on image processing according to claim 1, characterized in that: The step of comparing the position differences of corresponding pixels of the first road surface image and the second road surface image to form a disparity map, and calculating a depth map based on the disparity map includes: Performing stereo matching using a stereo matching algorithm to find out the same pixel points between the first road surface image and the second road surface image; Calculating the disparity value of each pixel to generate a disparity map; A depth value of each pixel is calculated, and the pixel value of the pixel is replaced by the depth value, so that the disparity map is converted into a depth map.
5. The crack identification method based on image processing according to claim 1, characterized in that: The step of inputting the feature vector into a classification model to output the type of cracks comprises: Reading feature vector information of the feature vector, and inputting the feature vector information into a first classifier, so that the first classifier determines whether the crack is a regular crack; If the crack is a regular crack, the feature vector information is input into the second classifier, so that the second classifier determines whether the crack is a transverse crack or a longitudinal crack.
6. The crack identification method based on image processing according to claim 1, characterized in that: After the step of obtaining the grayscale image, the method further comprises: Calculating the depth of the crack in the grayscale image using a depth calculation formula; The depth calculation formula includes: in, is the depth of the crack, is the depth value of the pixel point in the crack formation domain of the grayscale image, is the depth value of the pixel point in the domain formed outside the crack of the grayscale image, is the number of pixels in the domain formed by the cracks of the grayscale image.
7. A crack identification system based on image processing, characterized in that: The system comprises: An acquisition module, used to acquire a first road surface image and a second road surface image respectively, wherein the first road surface image and the second road surface image overlap by at least 50%; A calculation module, configured to compare the position difference of corresponding pixels between the first road surface image and the second road surface image to form a disparity map, and calculate a depth map based on the disparity map; An extraction module, configured to perform normalization processing on the depth map to convert it into a grayscale image, and extract HOG features and geometric features in the grayscale image, wherein the geometric features include the aspect ratio of the minimum bounding rectangle of the crack in the grayscale image, and the ratio of the area of the connected region of the crack to the area of the minimum bounding rectangle; An output module, used for fusing the HOG features and geometric features to form a feature vector, and inputting the feature vector into a classification model to output the type of the crack, and calculating the width of the crack according to the type of the crack using a width calculation process; The width calculation process includes: Traversing the crack to obtain coordinates of multiple target points between the starting point and the end point of the crack; Calculating the slope of the crack using the coordinates of two consecutive target points, and obtaining a normal line of the crack based on the slope; Using an edge detector to identify the edge of the crack, traversing the edge of the crack along the position of the normal line, and obtaining the coordinates of two points where the crack intersects with the normal line; Calculate the distance between the two intersecting points to obtain the width of the crack; The slope of the crack of the coordinates of the next two consecutive target points is calculated until all the consecutive two target points are calculated, and the maximum width of the crack is obtained based on the obtained widths of all the cracks.
8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the crack identification method based on image processing according to any one of claims 1 to 6 is implemented.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the crack identification method based on image processing according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
A pavement crack detection system based on machine vision
CN109146859A
Pavement crack detection method and system based on deep learning network
CN115082450A