Building material quality detection system based on image recognition
By optimizing path planning and image processing in the building material quality inspection system, the accuracy problem of building material inspection in complex environments was solved, and the effect of efficient identification of structural cracks and subtle defects was achieved.
Patent Information
- Application Number
- CN202510947312.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-10
AI Technical Summary
Existing building material quality inspection systems have difficulty achieving efficient and accurate surface defect detection when faced with lighting changes, material surface irregularities and texture complexity in complex environments. In particular, the identification of structural cracks is prone to misjudgment and omission.
A building material quality inspection system based on image recognition is used. The inspection area is divided through the mobile path planning module. Combined with the grayscale analysis and lighting parameter correction modules, path planning and image processing are optimized to identify structural cracks.
It improves the automation, accuracy and stability of detection, can adapt to different lighting conditions, and efficiently identify subtle defects, especially in the detection of complex textures and structural cracks, ensuring the reliability of detection results.
Smart Images

Figure CN120808027A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of building material quality detection, and particularly relates to a building material quality detection system based on image recognition. BACKGROUND
[0002] With the development of the construction industry, the quality control of building materials is becoming increasingly important. Traditional building material quality detection methods mainly rely on manual inspection and physical detection, which is labor-intensive and inefficient, and is easily affected by human factors, resulting in unstable and inaccurate detection results. With the development of machine vision technology, image recognition-based detection systems have gradually been applied in the quality detection of various products, especially in the field of building materials with high precision requirements.
[0003] Currently, the quality detection of building materials still faces many challenges, especially for surface defect detection. Common building materials such as stone, bricks, wood, etc. often have defects such as cracks, bubbles, holes, discoloration, etc. on the surface, which directly affect the stability and aesthetics of the building structure. Traditional detection methods often cannot effectively and quickly detect small and hidden defects, and different types of building materials often require different detection equipment and methods, increasing the complexity and cost of detection.
[0004] Existing machine vision systems mainly rely on high-quality cameras and precise lighting design, but most systems cannot fully cope with external interference in complex environments, such as lighting changes, irregularity of material surface, texture complexity, etc. Therefore, how to overcome these challenges and achieve efficient and accurate building material quality detection has become one of the difficulties in current technical research.
[0005] Chinese Patent Publication No. CN112098428A discloses a sheet-shaped building material manufacturing intelligent flaw recognition system based on machine vision; the invention relates to a sheet-shaped building material conveying mechanism, a standard industrial camera, a light source, a sensing trigger, and a processing unit, which specifically traverses each pixel point on the product image, calculates the gray level difference between the product image and the corresponding background image, compares the gray level difference with the preset threshold value, and marks the flaw pixel point when the threshold value is exceeded to obtain a flaw marked binary image.
[0006] However, the sheet-shaped building material flaw intelligent visual recognition system has fixed light source settings, which cannot adapt to different materials and surface characteristics, which may lead to uneven lighting and misidentification; the gray level difference threshold is fixed, which affects the detection accuracy of small flaws; the Blob algorithm is not accurate enough when dealing with complex flaws; the intelligent classifier has limited recognition ability for complex textures and small defects; the scoring mechanism is too simple and cannot accurately reflect the actual impact of flaws on the overall quality; these defects limit the accuracy and adaptability of the system. SUMMARY
[0007] To this end, the application provides a building material quality detection system based on image recognition to overcome the problem of inaccurate identification of structural cracks in dark areas, easy misjudgment and missed judgment caused by external interference and complex texture characteristics in the prior art.
[0008] To achieve the above-mentioned purpose, the application provides a building material quality detection system based on image recognition, comprising, A mobile path planning module is used to determine each fan-shaped detection area based on the top vertex of the top surface of the building material to be detected and the fan-shaped detection area division radius, and to obtain each circular detection area based on the circular detection area division radius and the circular center point in the remaining area, so as to determine the mobile path of the visual detection device; An image acquisition module is connected to the initial mobile path planning module and is used to sequentially obtain the image of each detection area based on the mobile path of the visual detection device; A gray scale analysis module is connected to the image acquisition module and is used to preprocess the image of each detection area and obtain the comparison result of the gray scale contrast of the image of each detection area and the standard gray scale contrast threshold; An illumination parameter correction module is connected to the gray scale analysis module and is used to perform brightness mean value judgment and illumination state analysis on the image of the detection area when the first gray scale contrast comparison result is obtained, and to perform corresponding adjustment operation based on the category to which the brightness mean value comparison result and the gray scale edge value comparison result belong; A quality visual recognition module is connected to the gray scale analysis module and is used to perform texture feature extraction and complexity classification when the second gray scale contrast comparison result is output by the gray scale analysis module, and to determine whether it is a true structural crack based on the comparison result between the number of texture branches and the standard number of texture branches.
[0009] Further, the mobile path planning module comprises a coordinate positioning unit, a detection area division unit and a mobile path planning unit, wherein, The coordinate positioning unit is used to obtain each vertex of the top surface of the building material to be detected, align the rotation axis center point with the vertex one by one and obtain the corresponding fan-shaped center point of the vertex, so as to divide each fan-shaped detection area and obtain the corresponding detection area division sequence mark; The detection area division unit is used to obtain the remaining area outside the fan-shaped detection area in the top surface of the building material to be detected, and to obtain each circular detection area and the corresponding detection area division sequence mark based on the circular detection area division method in the remaining area; Wherein, the circular detection area division method in the remaining area is determined by the category to which the number of overlapping fan-shaped detection areas belongs; The mobile path planning unit is used to determine the mobile path of the visual detection device based on the detection area division sequence mark and the detection area center point.
[0010] Further, the detection area division unit comprises a residual area obtaining subunit and a circular detection area division marking subunit, wherein, The residual area obtaining subunit is configured to obtain the first end point and the tail end point of each fan-shaped detection area intersecting the edge of the marble top surface based on the clockwise division mode, and determine the category of the number of overlapping fan-shaped detection areas based on the positional relationship and distance between the first and tail end points of different fan-shaped areas on the same top surface edge; The circular detection area division marking subunit is configured to divide the residual area into corresponding circular detection area division radii based on the category of the number of overlapping fan-shaped detection areas, to obtain each circular detection area and corresponding division order marks.
[0011] Further, the gray scale analysis module comprises an image preprocessing unit and a gray scale comparison unit, wherein, The image preprocessing unit is configured to perform preprocessing operations on the detection area image, and obtain the gray scale contrast of the detection area image to determine whether it is greater than the standard gray scale contrast threshold; The gray scale comparison unit is configured to compare the gray scale contrast of the detection area image with the standard gray scale contrast threshold to obtain a gray scale contrast comparison result.
[0012] Further, the light parameter correction module comprises a brightness mean value comparison unit and a light source intensity adjustment unit, wherein, The brightness mean value comparison unit is configured to calculate the brightness mean value of the detection area image when the first gray scale contrast comparison result is obtained, and compare it with the standard brightness mean value threshold to obtain a brightness mean value comparison result; The light source intensity adjustment unit is configured to perform corresponding adjustment operation steps on different gray scale edge value comparison results under the first brightness mean value comparison result.
[0013] Further, the light source intensity adjustment unit comprises a gray scale edge value comparison subunit and an adjustment operation subunit, wherein, The gray scale edge value comparison unit is configured to compare the gray scale edge value of the detection area image with the standard gray scale edge interval to obtain a gray scale edge value comparison result; The adjustment operation unit is configured to perform corresponding light source adjustment operation steps based on the category of the gray scale edge value comparison result.
[0014] Further, the quality visual recognition module comprises a texture feature extraction unit and a structure defect recognition unit, wherein, The texture feature extraction unit is configured to extract the main texture path and the texture branch point and the number of texture branches at the point in the detection area image when the second gray scale contrast comparison result is obtained, and obtain the texture branch number comparison result of the number of texture branches and the standard texture branch number threshold; The structure defect recognition unit is configured to recognize and judge the structural cracks of the detection area image when the first texture branch quantity comparison result is obtained.
[0015] Further, the texture feature extraction unit comprises a dark texture extraction subunit, a skeletonization processing subunit, and a texture branch quantity comparison subunit, wherein, The dark texture extraction subunit is configured to extract the dark texture region in the detection area image and generate a dark texture image and a corresponding texture contour image. The skeletonization processing subunit is configured to perform skeletonization processing on the dark texture image and the corresponding texture contour image to extract the main texture path and the texture branch points and the texture branch quantity at the branch points. The comparison subunit is configured to compare the texture branch quantity corresponding to each texture branch point with a standard texture branch threshold to obtain a texture branch quantity comparison result.
[0016] Further, the structure defect recognition unit comprises a structural crack recognition subunit and a texture branch quantity judgment unit, wherein, The structural crack recognition subunit is configured to judge whether the texture mutation region is a structural crack. The structural crack recognition subunit is configured to judge whether the texture mutation region is a structural crack. The texture branch quantity judgment unit is configured to exclude pseudo-structural cracks in the structural cracks.
[0017] Further, the structural crack recognition subunit judging whether the texture mutation region is a structural crack comprises, calculating the texture direction mutation rate, and dividing the texture mutation region and the continuous texture region based on the comparison result of the texture direction mutation rate and a standard texture direction mutation rate threshold; calculating the matching degree of the texture mutation region and the main texture path, and obtaining a structural crack recognition result when a first matching degree result is obtained.
[0018] Compared with the prior art, the present application has the beneficial effects that through gray scale analysis and illumination parameter correction, the system can automatically adapt to different illumination conditions, ensuring the stability of image quality; the texture feature extraction and structure defect recognition modules can efficiently recognize the subtle defects in the image, especially in the detection of complex textures and structural cracks; the system improves the automation, accuracy and stability of the detection by optimizing the path planning, image processing and defect recognition process, and can provide more reliable technical support for the quality detection of building materials.
[0019] Further, the coordinate positioning unit accurately obtains each vertex of the top surface of the building material to be detected and the corresponding center point of the sector, ensures the accurate division of each sector detection area, and provides accurate basic data for subsequent path planning; the detection area division unit flexibly demarcates the circular detection area according to the remaining area and the overlap of the sector detection area, thereby optimizing the coverage of the detection area and the accuracy of the path planning. The moving path planning unit reasonably determines the motion trajectory of the visual detection device by marking the detection area division order and the center point coordinates; in combination with the motion characteristics of the visual detection device, the path is smoothed, further improving the stability and collection efficiency of the path, avoiding sudden changes or irregular movements in the path, and improving the stability and accuracy of the overall detection process.
[0020] Further, the remaining area acquisition subunit accurately identifies the first and last end points of the intersection of the sector detection area and the edge of the marble top surface, and determines the overlap based on the positional relationship and distance, ensuring the rationality of the division of the sector detection area; under different overlap categories, the circular detection area division marking subunit can flexibly adjust the layout strategy of the circular detection area, optimize the coverage of the remaining area by adjusting the number and position of the circles, and effectively ensure the comprehensiveness and continuity of the detection area. Through appropriate adjustment and offset, it is ensured that all areas are covered without blind spots, and the strategy of not adjusting the radius and only adjusting the layout position is adopted, which simplifies the detection process and reduces the computational complexity. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 FIG. 1 is a structural schematic diagram of an image recognition-based building material quality detection system according to an embodiment of the present application; Figure 2 FIG. 2 is a connection schematic diagram of a detection area division unit according to an embodiment of the present application; Figure 3 FIG. 3 is a connection schematic diagram of a quality visual recognition module according to an embodiment of the present application; Figure 4 FIG. 4 is a logic determination diagram for determining whether a texture mutation region is a structural crack according to a structural crack recognition subunit of an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose and advantages of the present application clearer and more apparent, the present application will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the protection scope of the present application.
[0023] The preferred embodiments of the present application will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and do not limit the protection scope of the present application.
[0024] It should be noted that in the description of the present application, the terms "upper", "lower", "left", "right", "inner", "outer" and the like indicate the direction or positional relationship terms based on the direction or positional relationship shown in the drawings, which are only for the convenience of description, and do not indicate or imply that the device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0025] In addition, it should be noted that in the description of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected, it can be mechanically connected, or it can be electrically connected, it can be directly connected, or indirectly connected through an intermediate medium, it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0026] Please refer to Figure 1 The present application provides a kind of building material quality detection system based on image recognition, it is characterized in that, including, The movement path planning module is used to obtain a plurality of fan-shaped detection zones based on the top vertex of the top surface of the building material to be detected and the fan-shaped detection zone division radius, and a plurality of circular detection zones based on the circular detection zone division radius and the circular center point in the remaining area, to determine the movement path of the visual detection device; The image acquisition module is connected with the initial movement path planning module, and is used to sequentially acquire each detection zone image based on the movement path of the visual detection device; The gray scale analysis module is connected with the image acquisition module, and is used to preprocess each detection zone image, and obtain the comparison result of the gray scale contrast of any detection zone image and the standard gray scale contrast threshold; The illumination parameter correction module is connected with the gray scale analysis module, and is used to perform brightness mean value judgment and illumination state analysis on the detection zone image when the first gray scale contrast comparison result is obtained, and based on the category of the brightness mean value comparison result and the gray scale edge value comparison result, to perform corresponding adjustment operation; The quality visual recognition module is connected with the gray scale analysis module, and is used to perform texture feature extraction and complexity classification when the gray scale analysis module outputs the second gray scale contrast comparison result, and determine whether it is a true structural crack based on the comparison result between the number of texture branches and the standard number of texture branches.
[0027] In the embodiment, the image acquisition module is connected with the initial movement path planning module, and is used to acquire the image of the detection area marked as the first in the division order in the fan-shaped detection area, and sequentially acquire the image of the subsequent detection area in the division order after completing the visual recognition of the image quality of the area; The building material to be detected is a marble slab; The visual detection device structure comprises a controllable rotating shaft platform, and the image acquisition module is fixedly arranged on the platform. The image acquisition module is internally integrated with an industrial camera and an image sensor, and a plurality of LED lamp beads are arranged on the periphery of the image acquisition module in a uniform circumferential arrangement; In the embodiment, the actual length of the interval between the lamp beads is set according to the design requirements and the acquisition accuracy of the visual detection device; Generally, the interval of the lamp beads is designed to be adjusted according to the size of the marble slab, the complexity of the surface texture, and the image acquisition requirements, so as to ensure that the illumination of each acquisition area is uniform and free of shadows; The actual interval between the lamp beads is 5 to 10 mm, so as to ensure that uniform illumination covers each detection area and avoids excessive illumination or shadows; When the lamp beads are arranged linearly, the actual diameter of the entire ring is the working range of the front camera of the visual detection device, and is generally set to 50 to 100 mm; When starting detection, the rotating shaft drives the visual detection device to rotate, so that the image acquisition module can be aligned with the center direction of each vertex to acquire images, so as to form a plurality of preset fan-shaped areas. When reaching a specified angle position, the camera starts to acquire images immediately, and the lamp beads are synchronously lit to provide uniform light source for the images, so as to ensure the consistency of the image brightness and the gray scale distribution. After the image acquisition is completed, the rotating shaft continues to rotate and move according to the preset path; After the fan-shaped detection area is completely acquired, the rotating shaft continues to rotate according to the preset supplement strategy to acquire the remaining uncovered circular area.
[0028] Through gray scale analysis and illumination parameter correction, the system can automatically adapt to different illumination conditions to ensure the stability of the image quality. The texture feature extraction and structural defect recognition module can efficiently recognize the subtle defects in the image, especially in the detection of complex texture and structural cracks. The system optimizes the path planning, image processing and defect recognition process to improve the automation, accuracy and stability of the detection, and can provide more reliable technical support for the quality detection of building materials.
[0029] Specifically, the movement path planning module comprises a coordinate positioning unit, a detection area division unit and a movement path planning unit, wherein, The coordinate positioning unit is used to obtain each vertex of the top surface of the building material to be detected, align the center point of the rotating shaft with the vertex in sequence, and obtain the corresponding sector center point of the vertex, so as to obtain each sector detection area and the corresponding detection area division sequence mark; The detection area division unit is used to obtain the remaining area outside all sector detection areas in the top surface of the building material to be detected, obtain each circular detection area and the corresponding detection area division sequence mark based on the circular detection area division mode in the remaining area. The circular detection area division mode in the remaining area is determined by the category of the number of overlapping sector detection areas. The movement path planning unit is used to determine the movement path of the vision detection device based on the detection area division sequence mark and the detection area center point.
[0030] In this embodiment, the rotating shaft is the core rotating part of the vision detection device and is located at the center of the vision detection device. The main function of the rotating shaft is to support the rotating movement of the image acquisition module. The sector center point refers to the vertex of each sector when the rotating range of the rotating shaft is divided into multiple sector detection areas. The detection area division sequence is the numbering of the detection areas based on the acquisition time sequence of each detection area. The detection area division sequence mark refers to the numbering mark assigned to each detection area during the detection process. The division sequence mark of each detection area is obtained, and the corresponding detection area center points are connected in the order of the sequence mark from the first to the last, to obtain the movement path of the vision detection device. Meanwhile, the movement path planning unit smoothes the path based on the movement characteristics of the movement mechanism of the vision detection device. The right-angle turning points in the path are identified, and the right angles with a turning angle of 90° are replaced by a circular arc with a radius of 1 centimeter. The starting point and the ending point of the circular arc are smoothly connected with the front and rear parts of the path, respectively. If there are multiple consecutive right-angle turns in the path, the circular replacement processing is performed one by one to ensure smooth transition at each turning point.
[0031] The top points of the top surface of the building material to be detected and the corresponding center points of the sectors are accurately obtained by the coordinate positioning unit, ensuring the accurate division of the sector detection areas and providing accurate basic data for subsequent path planning; the detection area division unit flexibly divides the circular detection areas according to the remaining area and the overlap of the sector detection areas, thereby optimizing the coverage of the detection area and the accuracy of the path planning. The moving path planning unit reasonably determines the motion trajectory of the visual detection device by marking the center point coordinates according to the division order of the detection area; the path is smoothed in combination with the motion characteristics of the visual detection device, further improving the stability and collection efficiency of the path, avoiding sudden changes or irregular movements in the path, and improving the stability and accuracy of the overall detection process.
[0032] Referring to Figure 2 Fig. 3 is a connection diagram of the detection area division unit of the embodiment of the present application; Specifically, the detection area division unit includes a remaining area acquisition sub-unit and a circular detection area division marking sub-unit, wherein, The remaining area acquisition sub-unit is used to acquire the first end point and the tail end point of each sector detection area intersecting the edge of the marble top surface based on the clockwise division mode, and to determine the category of the number of overlapping sector detection areas based on the position relationship and distance between the first and tail end points of different sector areas on the same top surface edge; The circular detection area division marking sub-unit is used to divide the remaining area into corresponding circular detection area division radii based on the category of the number of overlapping sector detection areas, to obtain each circular detection area and the corresponding division order mark.
[0033] In this embodiment, the circular detection area and the sector detection area have the same detection radius, denoted as R; The diameter of the circular detection area is denoted as D, which satisfies D = 2R; The category of the number of overlapping sector detection areas includes no overlap category, two overlap category, and four overlap category; When laying out, the radius is not adjusted, and only the layout position and number are used to achieve comprehensive coverage of the remaining area; For the no overlap category, this category means that there is no overlapping area between the four sector detection areas, and the remaining area is a complete closed middle area; The boundary profile of the remaining area and its maximum continuous width and maximum continuous height are determined; Taking the upper left corner of the remaining area as the starting point, the centers of the circular detection areas are arranged along the horizontal direction at intervals D, and the center vertical coordinates remain fixed; after completing a row, the next row of circular detection areas is arranged by moving downward by D along the vertical direction; The grid is arranged as above until the entire remaining area is covered; for the edge area near the boundary but not completely covered, the center offset position is adjusted according to the actual remaining width and height, so that the circular detection area at the boundary covers the remaining part; The grid is arranged as above until the entire remaining area is covered; for the edge area near the boundary but not completely covered, the center offset position is adjusted according to the actual remaining width and height, so that the circular detection area at the boundary covers the remaining part; For the two overlapping categories, this category refers to the existence of two overlapping areas of the fan-shaped detection area; according to the maximum width of the remaining area According to the ratio of the diameter D, it is divided into two cases, including Less than or equal to D and Greater than D, wherein, If Greater than D, a plurality of circular detection areas are arranged along the width direction of the remaining area at a step distance close to the diameter D, and the circular detection areas are allowed to partially overlap, and the overlap ratio is controlled within 20%-30%, to ensure continuous coverage and reduce blind area; The center of the longitudinal direction is arranged in multiple rows with a distance D, and appropriate overlap is also allowed; The edge part can be adjusted according to the shape of the remaining area, and the center of the circular detection area can be adjusted; If Less than or equal to D, and the remaining area can be completely covered by a single circular detection area; If the remaining area is not wide enough but irregular in shape, additional auxiliary circular detection areas are appropriately added to allow partial overlap between the circular detection areas; For the four overlapping categories, a circular detection area is preferentially arranged at the geometric center of the remaining area; If the circular detection area cannot completely cover the entire remaining area, 2-3 circular detection areas or semicircular detection areas are arranged at intervals of D / 2 around it, and the center positions are adjusted to ensure complete coverage of the remaining area.
[0034] The remaining area acquisition subunit accurately identifies the first and last endpoints of the intersection of the fan-shaped detection area and the edge of the marble top surface, and judges the overlap based on the positional relationship and distance, ensuring the rationality of the division of the fan-shaped detection area; under different overlapping categories, the circular detection area division and marking subunit can flexibly adjust the arrangement strategy of the circular detection area, optimize the coverage of the remaining area by adjusting the number and position of the circular detection area; this module effectively ensures the comprehensiveness and continuity of the detection area, and through appropriate adjustment and offset, it ensures that all areas are covered without blind area; by using the strategy of not adjusting the radius and only adjusting the arrangement position, the detection process is simplified and the calculation complexity is reduced.
[0035] Specifically, the gray scale analysis module includes an image preprocessing unit and a gray scale comparison unit, wherein, The image preprocessing unit is configured to perform a preprocessing operation on the detection area image and obtain a gray scale contrast of the detection area image to determine whether the gray scale contrast is greater than a standard gray scale contrast threshold value; The gray scale comparison unit is configured to compare the gray scale contrast of the detection area image with the standard gray scale contrast threshold value to obtain a gray scale contrast comparison result.
[0036] In this embodiment, the image preprocessing subunit performs a preprocessing operation of filtering and noise reduction and contrast enhancement on the collected detection area image to improve the gray scale feature performance of the image. After preprocessing, the color image is converted into a single-channel gray scale image, and the gray scale mean value and the gray scale standard deviation of all pixels in the gray scale image are calculated. The gray scale mean value calculation formula is as follows: , wherein N is the total number of image pixels, is the gray scale value of the i-th pixel; The gray scale standard deviation calculation formula is as follows: , The gray scale contrast is calculated based on the gray scale mean value and the standard deviation, , wherein, is a small constant to prevent the denominator from being zero, and ; The gray scale comparison subunit compares the gray scale contrast of the detection area image with the standard gray scale contrast threshold value, If the gray scale contrast is greater than the standard gray scale contrast threshold value, a first gray scale contrast comparison result is obtained, the image quality is abnormal, and it is determined whether to perform a light source adjustment operation; If the gray scale contrast is less than or equal to the standard gray scale contrast threshold value, the image quality is normal, a second gray scale contrast comparison result is obtained, and quality visual recognition is further performed. In this embodiment, the standard gray scale contrast threshold value is 0.3 based on historical production data.
[0037] Through the filtering and noise reduction and contrast enhancement of the image by the image preprocessing subunit, the gray scale feature performance of the image is improved. The gray scale comparison subunit quickly identifies the image quality by comparing the gray scale contrast with the standard threshold value, and triggers the corresponding light parameter correction based on the identification result, so as to ensure that the image quality meets the detection standard and improve the reliability and accuracy of subsequent visual recognition.
[0038] Specifically, the light parameter correction module includes a brightness mean value comparison unit and a light source intensity adjustment unit, wherein, The luminance mean comparison unit is configured to calculate the luminance mean of the detection area image when the first gray contrast comparison result is obtained, and compare the luminance mean with a standard luminance mean threshold to obtain a luminance mean comparison result. The light source intensity adjustment unit is configured to perform corresponding adjustment operation steps on the first luminance mean comparison result and different gray edge value comparison results.
[0039] In this embodiment, the luminance mean comparison unit is configured to calculate the luminance mean based on the luminance channel data of the acquired detection area image when the first gray contrast comparison result is obtained The color image is converted from the RGB color space to the YUV color space, the luminance channel Y is extracted, and the calculation formula of the luminance mean is , wherein Y(i, j) represents the luminance value of the i-th row and j-th column pixel in the luminance channel, and M and N are the number of rows and columns of the image, respectively. The standard luminance mean threshold is 0.6, the luminance mean of the detection area image is compared with the standard luminance mean threshold, If the luminance mean is greater than the standard luminance mean threshold, the first luminance mean comparison result is obtained, the image luminance is too high, and the corresponding light source adjustment operation is performed based on the gray edge value comparison result; If the luminance mean is less than or equal to the standard luminance mean threshold, the image luminance is too low, the second luminance mean comparison result is obtained, and the light bead luminance is adjusted to 150% of the initial light bead luminance.
[0040] The luminance mean comparison unit accurately calculates the luminance mean of the detection area image, compares it with the standard threshold, judges the illumination state of the image in real time, and performs corresponding adjustment measures; this mechanism effectively avoids the image quality problems caused by insufficient or excessive illumination, and improves the stability of the illumination environment and the consistency of image acquisition.
[0041] Specifically, the light source intensity adjustment unit includes a gray edge value comparison subunit and an adjustment operation subunit, wherein The gray edge value comparison unit is configured to compare the gray edge value of the detection area image with the standard gray edge interval to obtain a gray edge value comparison result. The adjustment operation unit is configured to perform adjustment operation steps of the corresponding light source based on the category of the gray edge value comparison result.
[0042] In this embodiment, the Sobel operator is used to calculate the gradient amplitude of each pixel in the detection area image, and the average value is taken to represent the edge sharpness of the whole image, and the calculation formula is , wherein, is the gradient of the i-th pixel in the X direction; is the gradient of the i-th pixel in the Y direction; N is the total number of pixels; the gray edge value of the detection area image is compared with the standard gray edge interval, if the gray edge value is greater than or equal to the maximum value of the standard gray edge interval, a first gray edge value comparison result is obtained, the image edge intensity is high, the texture complexity is large, that is, the image is clear, and the light source is not adjusted; if the gray edge value is within the standard gray edge interval, a second gray edge value comparison result is obtained, the light distribution is uneven, and a light source adjustment operation of adjusting the lamp bead brightness to 80% of the initial lamp bead brightness is performed.
[0043] if the gray edge value is less than or equal to the minimum value of the standard gray edge interval, a third gray edge value comparison result is obtained, the image edge is not clear, the texture details are missing, and a light source adjustment operation of reducing the light source height H is performed.
[0044] By analyzing the image edge definition and texture complexity, the light source intensity and the light source height are dynamically adjusted to ensure that the image quality is optimal; for an image with clear edges, the light source is kept unchanged; for an image with uneven light distribution or blurred edges, the light source brightness or height is automatically adjusted to improve the lighting effect.
[0045] Referring to Figure 3 , which is a connection diagram of the quality visual recognition module of the embodiment of the present application; Specifically, the quality visual recognition module comprises a texture feature extraction unit and a structural defect recognition unit, wherein, The texture feature extraction unit is used to extract the main texture path and the texture branch point and the texture branch quantity thereof in the detection area image when the second gray contrast comparison result is obtained, and obtain a texture branch quantity comparison result of the texture branch quantity and a standard texture branch quantity threshold value; The structural defect recognition unit is used to identify and judge the structural cracks of the detection area image when the first texture branch quantity comparison result is obtained.
[0046] Specifically, the texture feature extraction unit comprises a dark texture extraction subunit, a skeleton processing subunit and a texture branch quantity comparison subunit, wherein, The dark texture extraction subunit is used to extract the dark texture region in the detection area image and generate a dark texture map and a corresponding texture contour map; The skeletonization processing subunit is configured to perform skeletonization processing on the dark texture image and the corresponding texture contour image to extract a main texture path and texture branch points and a texture branch quantity at the texture branch points. The comparison subunit is configured to compare the texture branch quantity corresponding to each texture branch point with a standard texture branch quantity threshold to obtain a texture branch quantity comparison result.
[0047] In this embodiment, the dark texture extraction subunit is configured to extract a dark texture region in the detection area image and generate a dark texture image and a corresponding texture contour image, and the specific steps are as follows: The global adaptive threshold is calculated based on the Otsu threshold segmentation method , and a pixel region with a gray value lower than is extracted to form the dark texture image. After the dark texture image is subjected to Gaussian filtering and noise reduction, an edge contour is extracted using a Canny edge detection algorithm, a low threshold is set to 50, a high threshold is set to 150, and a texture contour image is obtained. The skeletonization processing subunit is configured to extract a main texture path and texture branch points of the dark texture structure, and the specific steps are as follows: The texture contour image is subjected to binarization thinning processing, and a skeleton image is generated using the Zhang-Suen algorithm. The longest connected path in the skeleton image is extracted as the main texture path. Connection nodes other than the main texture path are identified as texture branch points, and the texture branch quantity of each branch point is counted. The texture branch quantity comparison subunit is configured to compare the texture branch quantity of each branch point counted above with a standard texture branch quantity threshold set to obtain a texture branch quantity comparison result. The standard texture branch quantity threshold is set to 15, the texture branch quantity of the branch point is compared with the standard texture branch quantity threshold set, If the texture branch quantity is greater than the standard texture branch quantity threshold, a first texture branch quantity comparison result is obtained, and when a subsequent identification result is a structural crack, the crack is determined to be a true structural crack. If the texture branch quantity is less than or equal to the standard texture branch quantity threshold, a second texture branch quantity comparison result is obtained, and when a subsequent identification result is a structural crack, the crack is determined to be a pseudo structural crack.
[0048] By accurately extracting the dark texture region in the image and performing skeletonization processing, the main texture path and the texture branch points are successfully extracted, and clear structural information of the image texture is provided. By accurately comparing the texture branch quantity, the structural crack and the pseudo crack are effectively distinguished, and the accuracy of crack identification is improved.
[0049] Specifically, the structural defect identification unit comprises a structural crack identification subunit and a texture branch quantity judgment unit, wherein, The structural crack identification subunit is used to judge whether the texture mutation region is a structural crack. Wherein, the texture direction mutation rate is identified based on the texture direction gradient change, and whether it is a structural crack is judged in combination with the matching degree of the texture mutation region and the main texture path. The texture branch quantity judgment unit is used to exclude pseudo structural cracks in the structural cracks.
[0050] In this embodiment, the structural crack identification subunit is used to judge whether the texture mutation region is a structural crack, which calculates the texture direction mutation rate based on the change of the texture direction gradient; Take the standard texture direction mutation rate threshold value as 0.5, compare the mutation rate with the standard texture direction mutation rate threshold value, identify the texture mutation region and the continuous texture region; The matching degree between the texture mutation region and the main texture path is calculated. If the matching degree meets the first matching degree, mark the region as a structural crack, get the texture branch quantity in the region, and if the texture branch quantity is greater than the standard texture branch quantity threshold value, get a true structural crack, If the texture branch quantity is less than or equal to the standard texture branch quantity threshold value, it is a pseudo structural crack.
[0051] By accurately calculating the texture direction mutation rate and the matching degree of the texture mutation region and the main texture path, the existence of the structural crack is successfully judged, and in combination with the texture branch quantity judgment, the true structural crack and the pseudo crack can be effectively distinguished to avoid misjudgment.
[0052] Referring to Figure 4 It is a logic judgment diagram of the structural crack identification subunit of the embodiment of the application for judging whether the texture mutation region is a structural crack.
[0053] Specifically, the structural crack identification subunit judges whether the texture mutation region is a structural crack, comprising, Calculate the texture direction mutation rate, and divide the texture mutation region and the continuous texture region based on the comparison result of the texture direction mutation rate and the standard texture direction mutation rate threshold value; Calculate the matching degree of the texture mutation region and the main texture path, and get the structural crack identification result when the first matching degree result is obtained.
[0054] In this embodiment, for the texture mutation region extracted from the image, first calculate the texture direction mutation rate thereof; The texture direction mutation rate can be analyzed by analyzing the gradient change of the image texture, and the specific calculation method is, , wherein, I(x, y) is the gray gradient of a point in the image, and the area is the total number of pixels of the texture mutation region; The standard texture direction mutation rate threshold is taken as 0.3, the calculated texture direction mutation rate is compared with the preset standard texture direction mutation rate threshold, If the texture direction mutation rate is greater than the standard texture direction mutation rate threshold, the region has strong texture direction mutation, the region is a texture mutation region, and the matching degree of the texture mutation region and the main texture path is further calculated; If the texture direction mutation rate is less than or equal to the standard texture direction mutation rate threshold, the region does not have strong texture direction mutation, the region is a continuous texture region, and the region has no defects; For the texture mutation region screened by the mutation rate, the matching degree with the extracted main texture path is further calculated; The matching degree is calculated by calculating the Hausdorff distance, , wherein, A is the contour point set of the texture mutation region; B is the contour point set of the main texture path; ||·|| is the Euclidean distance; The standard distance threshold is taken as 8 pixels, the calculated Hausdorff distance is compared with the standard distance threshold, If the Hausdorff distance is greater than the standard distance threshold, a first matching degree result is obtained, the texture mutation region has strong consistency with the main texture path, and the region has a structural crack; If the Hausdorff distance is less than or equal to the standard distance threshold, a second matching degree result is obtained, the consistency of the texture mutation region and the main texture path is weak, and the region has a non-structural crack.
[0055] By calculating the matching degree of the texture direction mutation rate and the main texture path, and combining the Hausdorff distance for matching degree analysis, the identification performance for complex textures and small-scale cracks is especially improved.
[0056] So far, the technical solutions of the present application have been described in combination with the preferred embodiments shown in the drawings, but those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to related technical features without departing from the principles of the present application, and the technical solutions after these changes or replacements will all fall within the protection scope of the present application.
[0057] The above merely illustrates the preferred embodiments of the present application, and is not used to limit the present application; for those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A building material quality detection system based on image recognition, characterized in that: include, A moving path planning module is used to obtain each sector-shaped detection area based on the vertex of the top surface of the building material to be inspected and the radius of the sector-shaped detection area, and to obtain each circular detection area based on the radius of the circular detection area within the remaining area and the center point of the circle to determine the moving path of the visual inspection device; An image acquisition module, connected to the movement path planning module, for sequentially acquiring images of each detection area based on the movement path of the visual detection device; a grayscale analysis module connected to the image acquisition module, for preprocessing the images of each detection area and obtaining a comparison result of the grayscale contrast of each detection area image with a standard grayscale contrast threshold; an illumination parameter correction module connected to the grayscale analysis module, configured to perform brightness mean value judgment and illumination state analysis on the detection area image when the first grayscale contrast comparison result is obtained, and to perform corresponding adjustment operations based on the categories to which the brightness mean comparison result and the grayscale edge value comparison result belong; A quality visual recognition module is connected to the grayscale analysis module and is used to perform texture feature extraction and complexity classification when the grayscale analysis module outputs a second grayscale contrast comparison result, and to determine whether it is a true structural crack based on the comparison result between the number of texture branches and the standard texture branch number threshold.
2. The building material quality detection system based on image recognition according to claim 1 is characterized in that: The movement path planning module includes a coordinate positioning unit, a detection area division unit and a movement path planning unit, wherein: The coordinate positioning unit is used to obtain each vertex of the top surface of the building material to be inspected, align the center point of the rotation axis with the vertex in sequence and obtain the center point of the sector corresponding to the vertex, so as to divide each sector-shaped inspection area and the corresponding inspection area division order mark; The detection area division unit is used to obtain the remaining area outside the sector-shaped detection area on the top surface of the building material to be inspected, and obtain each circular detection area and the corresponding detection area division order mark based on the circular detection area division method within the remaining area; The division method of the circular detection area within the remaining area is determined by the category to which the number of overlapping sector-shaped detection areas belongs; The moving path planning unit is used to determine the moving path of the visual inspection device based on the detection area division order mark and the detection area center point.
3. The building material quality detection system based on image recognition according to claim 2 is characterized in that: The detection area division unit includes a remaining area acquisition subunit and a circular detection area division marking subunit, wherein: The remaining area acquisition subunit is used to obtain the starting and ending points of each sector detection area intersecting with the edge of the marble top surface based on the clockwise division method, and to determine the category to which the number of overlapping sector detection areas belongs based on the positional relationship and distance between the starting and ending points of different sector areas on the same top surface edge; The circular detection area division marking subunit is used to divide the remaining area with the corresponding circular detection area division radius based on the category to which the number of overlapping sector-shaped detection areas belongs, so as to obtain each circular detection area and the corresponding division order mark.
4. The building material quality detection system based on image recognition according to claim 1 is characterized in that: The grayscale analysis module includes an image preprocessing unit and a grayscale comparison unit, wherein: The image preprocessing unit is used to perform a preprocessing operation on the detection area image and obtain the grayscale contrast of the detection area image to determine whether it is greater than a standard grayscale contrast threshold; The grayscale comparison unit is used to compare the grayscale contrast of the detection area image with a standard grayscale contrast threshold to obtain a grayscale contrast comparison result.
5. The building material quality detection system based on image recognition according to claim 1 is characterized in that: The illumination parameter correction module includes a brightness mean comparison unit and a light source intensity adjustment unit, wherein: The brightness mean comparison unit is used to calculate the brightness mean of the detection area image when obtaining the first grayscale contrast comparison result and compare it with the standard brightness mean threshold to obtain the brightness mean comparison result; The light source intensity adjustment unit is used to perform corresponding adjustment operation steps based on the grayscale edge value under the first brightness mean comparison result.
6. The building material quality detection system based on image recognition according to claim 5 is characterized in that: The light source intensity adjustment unit includes a grayscale edge value comparison subunit and an adjustment operation subunit, wherein: The grayscale edge value comparison unit is used to compare the grayscale edge value of the detection area image with the standard grayscale edge interval to obtain a grayscale edge value comparison result; The adjustment operation unit is used to perform an adjustment operation step of a corresponding light source based on the category to which the grayscale edge value comparison result belongs.
7. The building material quality detection system based on image recognition according to claim 1 is characterized in that: The quality visual recognition module includes a texture feature extraction unit and a structural defect recognition unit, wherein: The texture feature extraction unit is configured to extract a main texture path and a texture branch point in the detection area image and the number of texture branches therein when obtaining the second grayscale contrast comparison result, and obtain a texture branch number comparison result between the texture branch number and a standard texture branch number threshold; The structural defect recognition unit is used to recognize and determine structural cracks in the detection area image when obtaining the first texture branch number comparison result.
8. The building material quality detection system based on image recognition according to claim 7 is characterized in that: The texture feature extraction unit includes a dark texture extraction subunit, a skeleton processing subunit and a texture branch number comparison subunit, wherein: The dark texture extraction subunit is used to extract the dark texture area in the detection area image and generate a dark texture map and a corresponding texture contour map; The skeletonization processing subunit is used to perform skeletonization processing on the dark texture image and the corresponding texture contour image to extract the main texture path and texture branch points and the number of texture branches at the locations; The comparison subunit is used to compare the texture branch quantity corresponding to each texture branch point with a standard texture branch threshold to obtain a texture branch quantity comparison result.
9. The building material quality detection system based on image recognition according to claim 7, characterized in that: The structural defect recognition unit includes a structural crack recognition subunit and a texture branch quantity judgment unit, wherein: The structural crack identification subunit is used to determine whether the texture mutation area is a structural crack; Among them, the texture mutation area is identified based on the texture direction mutation rate, and whether it is a structural crack is determined by combining the matching degree between the texture mutation area and the main texture path; The texture branch quantity determination unit is used to exclude pseudo-structural cracks from structural cracks.
10. The building material quality detection system based on image recognition according to claim 9, characterized in that: The structural crack identification subunit determines whether the texture mutation area is a structural crack, including: Calculate the texture direction mutation rate, and divide the texture mutation area and continuous texture area based on the comparison result between the texture direction mutation rate and the standard texture direction mutation rate threshold; The matching degree between the texture mutation area and the main texture path is calculated, and when the first matching degree result is obtained, the structural crack identification result is obtained.
Citation Information
Patent Citations
Intelligent defect recognition system based on machine vision in sheet building material manufacturing
CN112098428A
Liver ultrasonic image identification method based on sparse expression
CN105956620A
Anchoring device for detecting strength of mortar surface layer
CN118857948A
Product detection method and system based on machine vision
CN119323659A
Cooperative control system and method of building concrete strength detection robot
CN119356406A