Intelligent recognition system and method for defects of bare bricks
Technical Field
The invention belongs to the technical field of building construction, and particularly relates to an intelligent recognition system and method for defects of ganged bricks.
Background
Due to the requirements of building appearance and building style, the ganged brick is commonly used in ancient buildings and building engineering fusing historical landscape building style. In the process of firing and transporting the ganged brick to a construction site in a processing plant, due to the influence of a plurality of factors such as unstable fire control, uneven heating surface, unstable transportation path, careless field transportation and the like, the defects of inconsistent color of each brick surface, cracks, unfilled corners, edge explosion, surface defect and the like of part of ganged bricks are often caused, the ganged bricks cannot be normally used, and the brick selection work needs to be carried out on the construction site to screen the ganged bricks meeting the use requirements of building construction.
At the present stage, the method for screening the ganged bricks adopts manual screening, the color and the size of the ganged bricks meeting the requirements of the building appearance are confirmed by project owners or design parties, after the ganged bricks enter a field in batches, workers select the ganged bricks by eyes, the ganged bricks which have obvious surface defects, large color difference, large size deviation and the like and do not meet the requirements are abandoned, and the ganged bricks meeting the requirements are reserved for subsequent construction.
However, the manual screening method has the problems of large workload and low working efficiency, and the differences of the illumination environment, distance, angle and human visual perception observed by each worker cause difficulty in accurately judging whether the defect degree and color difference of the brick surface of the plain brick meet the standard or not, so that the visual effect of the existing plain brick outer wall of a plurality of projects after being built is not ideal, and a large number of plain bricks with defects and obvious color differences of the brick surface still exist.
In view of this, a new system for intelligent recognition of defects of the ganged brick and automatic comparison of color differences based on computer vision is needed to be provided, so that the defects and the color differences of the ganged brick are digitally and quantitatively evaluated, the current manual screening method is replaced by the visual perception qualitative evaluation only depending on human vision, the high-efficiency, high-standard and high-quality ganged brick selection process is realized, and the defects of the manual screening method in the process of completing the on-site ganged brick selection work are overcome.
Disclosure of Invention
In order to improve the efficiency and accuracy of the bare brick identification, the invention provides an intelligent bare brick defect identification system and method.
The technical scheme of the intelligent clear water brick defect identification system is as follows:
an intelligent clear water brick defect identification system comprises an image acquisition module, an identification and extraction module, a calibration module and a judgment module;
the image acquisition module is in signal connection with the identification and extraction module;
the identification and extraction module is respectively in signal connection with the calibration module and the judgment module;
the calibration module is in signal connection with the discrimination module.
According to the intelligent clear water brick defect identification system, the photos of the brick surfaces of at least two standard bricks and the brick to be selected are acquired through the image acquisition module, and the photos of the brick surfaces of the clear water brick are processed through the identification and extraction module, so that the image of the brick surface of the standard brick and the image of the brick surface of the brick to be selected are obtained. The calibration module can calculate the standard histogram correlation coefficient A of the standard brick surface image according to any two standard brick surface imagesstaOr its standard color difference value deltaE in LAB spacesta(ii) a The discrimination module calculates the correlation coefficient A of the histogram to be selected according to the brick surface image of any standard brick and the brick surface image of the brick to be selected1Or its value of the color difference to be selected Δ E1 in LAB space. And judging whether the brick to be selected meets the use condition or not by comparing the histogram correlation coefficient with the color difference value.
Compared with the existing construction site brick selection work, the intelligent recognition system for the defects of the ganged bricks adopts an artificial screening method which depends on human eye vision perception, utilizes artificial intelligent means such as a computer vision technology and the like to intelligently recognize and compare the color difference of the ganged bricks, realizes the intelligent and automatic brick selection flow of the ganged bricks in batch, avoids the complex working flows of observing and comparing the ganged bricks one by the artificial screening method, and improves the working efficiency. And the color difference of the bare brick is subjected to digital quantitative evaluation, so that a corresponding self-adaptive color difference evaluation standard can be formed according to the requirements of the building appearance and the building style of different engineering projects, and the evaluation standard is not limited by the project requirements. In addition, compared with the visual perception qualitative evaluation of a manual screening method depending on human vision, the clear water brick color difference quantitative evaluation standard adopted by the invention has smaller discrete type of the discrimination result and higher accuracy of the discrimination result.
Furthermore, in the intelligent bare brick defect identification system, in order to facilitate the display of the identification result, the intelligent bare brick defect identification system further comprises a result display module, and the result display module is in signal connection with the judgment module.
The invention also provides an intelligent clear water brick defect identification method, which adopts the following technical scheme that the intelligent clear water brick defect identification method comprises the following steps:
s1, determining at least two plain bricks as standard bricks; the standard brick is used for calibrating the allowable defect value and the color difference value range of the brick surface of the bare brick;
s2, the image acquisition module finishes the work of acquiring the brick surface images of the plain bricks of the standard bricks and the bricks to be selected, and respectively forms standard brick photos and bricks to be selected;
s3, the image acquisition module transmits the standard brick photo and the to-be-selected brick photo to the recognition and extraction module, and the recognition and extraction module performs background removal, brick surface recognition, brick surface segmentation and brick surface extraction on the standard brick photo and the to-be-selected brick photo to respectively form a standard brick surface image and a to-be-selected brick surface image;
s4, the recognition and extraction module transmits the brick surface image of the brick to be selected to the discrimination module;
s5, the recognition and extraction module transmits the standard brick surface images to the calibration module, the calibration module utilizes the CompareHist function in the Python Opencv to perform histogram correlation calculation on any two standard brick surface images to obtain a standard histogram correlation coefficient Asta;
S6, the calibration module transmits the brick surface image of any standard brick to the discrimination module;
s7, the discrimination module utilizes CompareHist function in Python Opencv to calculate histogram correlation between the standard brick surface image and the brick surface image to be selected to obtain correlation coefficient A of the histogram to be selected1;
S8, when A is1>AstaAnd in time, the brick surface of the brick to be selected meets the requirement.
Compared with the existing construction site brick selection work of the plain bricks, the intelligent recognition method of the defects of the plain bricks adopts an artificial screening method based on human eye vision perception, utilizes artificial intelligent means such as a computer vision technology and the like to intelligently recognize and compare the color difference of the plain bricks, realizes the intelligent and automatic brick selection flow of the plain bricks in batch, avoids the complex working flows of observing and comparing the plain bricks one by the artificial screening method, and improves the working efficiency. And the color difference of the bare brick is subjected to digital quantitative evaluation, so that a corresponding self-adaptive color difference evaluation standard can be formed according to the requirements of the building appearance and the building style of different engineering projects, and the evaluation standard is not limited by the project requirements. In addition, compared with the visual perception qualitative evaluation of a manual screening method depending on human vision, the clear water brick color difference quantitative evaluation standard adopted by the invention has smaller discrete type of the discrimination result and higher accuracy of the discrimination result.
Further, in the intelligent bare brick defect identification method, in S2, the image acquisition module acquires a standard brick photo and a to-be-selected brick photo under the same illumination condition. The image acquisition module adopts an industrial camera, a single lens reflex camera and a mobile phone camera, the resolution ratio has no high requirement, but the acquisition work of the standard brick photo and the to-be-selected brick photo uses the same shooting equipment under the same parameter under the same illumination condition, and the shooting angle is as vertical as possible to the brick surface of the bare brick.
Further, in the intelligent bare brick defect identification method, in S3, the method includes the following steps:
s3-1, the recognition and extraction module receives the standard brick photo and the to-be-selected brick photo;
s3-2, denoising the standard brick photo and the to-be-selected brick photo; image noise removal can be carried out on the standard brick photo and the to-be-selected brick photo by utilizing a Gaussian filtering denoising principle so as to reduce the interference of noise in the image on the subsequent brick surface identification, segmentation and extraction work;
s3-3, performing graying processing on the standard brick picture and the picture of the brick to be selected; after graying processing, the standard brick picture and the picture of the brick to be selected are converted into a single-component image representation form of R, G and B from an RGB three-component image representation form, so that the running speed of the intelligent clear water brick defect identification system can be increased, and image banding distortion is avoided;
s3-4, acquiring four vertex coordinates of the brick surface of the bare brick in the standard brick picture and the picture of the brick to be selected, and acquiring an image of the brick surface of the standard brick and an image of the brick surface of the brick to be selected according to the four vertex coordinates; based on the fact that the size of the brick surface of the bare brick is a fixed rectangular shape, edge calculation can be carried out by using a Canny operator to obtain four vertex coordinates of the brick surface in an image, and then the brick surface image is segmented from a photo to form a standard brick surface image and a brick surface image of a brick to be selected;
and S3-5, performing binarization processing on the standard brick face image and the brick face image to be selected to set a small amount of background colors still existing in the image to be black.
Further, in the intelligent bare brick defect identification method, the step S3 includes performing color space conversion on the brick surface image of the standard brick and the brick surface image of the brick to be selected, converting the brick surface image of the standard brick from an RGB space to an XYZ space, and then converting the brick surface image of the brick to an LAB space; according to the national standard GB/T18922-;
s5 further includes calculating the standard color difference value delta E of any two standard brick face images in the LAB spacesta(ii) a In LAB space, there is (Δ E)2=(ΔL)2+(Δa)2+(Δb)2Wherein, the delta E is a color difference value, the delta L is a brightness difference value which is more than 0, the surface to be measured is white and less than 0, and the surface to be measured is black. And delta a is the color difference value in the red and green directions, is more than 0, is reddish and is less than 0, and is greenish. Δ b is. . . And if the color difference value in the yellow-blue direction is greater than 0, the surface to be detected is yellow and less than 0, and the surface to be detected is blue. Two can be calculated according to the above formulaThe color difference value Δ E of the image;
s7 further comprises the step of calculating to-be-selected color difference value delta E1 of the brick surface image of the standard brick and the brick surface image of the to-be-selected brick in an LAB space;
s8 also includes that when the condition that delta E1< delta Esta is met, the brick surface of the brick to be selected meets the requirement.
And meanwhile, the histogram correlation coefficient and the color difference value are quoted to judge whether the brick to be selected meets the use condition, so that the comparison accuracy can be improved.
Drawings
Fig. 1 is a schematic diagram of an intelligent bare brick defect identification system of the invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. Advantages and features of the present invention will become apparent from the following description and from the claims. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Example 1:
the technical scheme of the intelligent clear water brick defect identification system of the embodiment is as follows:
an intelligent clear water brick defect identification system comprises an image acquisition module 1, an identification and extraction module 2, a calibration module 3 and a discrimination module 4;
the image acquisition module 1 is in signal connection with the identification and extraction module 2;
the identification and extraction module 2 is respectively in signal connection with the calibration module 3 and the discrimination module 4;
the calibration module 3 is in signal connection with the discrimination module 4.
The system for intelligently identifying the defects of the plain brick comprises an image acquisition module 1, a recognition and extraction module 2 and a selection module, wherein the image acquisition module 1 is used for acquiring photos of the brick surfaces of at least two standard bricks and the brick to be selected, and the photos of the brick surfaces of the plain brick are processed through the recognition and extraction module 2, so that the image of the brick surface of the standard brick and the image of the brick surface of the brick to be selected are obtained. The calibration module 3 can calculate the image of the brick surface of the standard brick according to the image of the brick surface of any two standard bricksCorrelation coefficient A of standard histogramstaOr its standard color difference value deltaE in LAB spacesta(ii) a The discrimination module 4 calculates the correlation coefficient A of the histogram to be selected according to the brick surface image of any standard brick and the brick surface image of the brick to be selected1Or its value of the color difference to be selected Δ E1 in LAB space. And judging whether the brick to be selected meets the use condition or not by comparing the histogram correlation coefficient with the color difference value.
Compared with the existing construction site brick selection work of the plain brick, the intelligent clear brick defect identification system adopts an artificial screening method relying on human eye vision perception, utilizes artificial intelligence means such as a computer vision technology and the like to intelligently identify and compare the color difference of the plain brick, realizes the intelligent and automatic brick selection flow of the plain brick in batch, avoids the complex working flow of observing and comparing the plain brick one by the artificial screening method, and improves the working efficiency. And the color difference of the bare brick is subjected to digital quantitative evaluation, so that a corresponding self-adaptive color difference evaluation standard can be formed according to the requirements of the building appearance and the building style of different engineering projects, and the evaluation standard is not limited by the project requirements. In addition, compared with the visual perception qualitative evaluation of a manual screening method depending on human vision, the clear water brick color difference quantitative evaluation standard adopted by the invention has smaller discrete type of the discrimination result and higher accuracy of the discrimination result.
As a preferred embodiment, in the intelligent recognition system for the defects of the ganged bricks, in order to facilitate the display of the recognition result, a result display module 5 is further included, and the result display module 5 is in signal connection with the judgment module 4.
Example 2:
the embodiment provides an intelligent clear water brick defect identification method, which adopts the following technical scheme that the method comprises the following steps:
s1, determining at least two plain bricks as standard bricks; the standard brick is used for calibrating the allowable defect value and the color difference value range of the brick surface of the bare brick;
s2, the image acquisition module 1 finishes the work of acquiring the brick surface images of the plain bricks of the standard bricks and the bricks to be selected, and respectively forms the photos of the standard bricks and the photos of the bricks to be selected;
s3, the image acquisition module 1 transmits the standard brick photo and the to-be-selected brick photo to the recognition and extraction module 2, and the recognition and extraction module 2 performs background removal, brick surface recognition, brick surface segmentation and brick surface extraction on the standard brick photo and the to-be-selected brick photo to respectively form a standard brick surface image and a to-be-selected brick surface image;
s4, the recognition and extraction module 2 transmits the brick surface image of the brick to be selected to the discrimination module 4;
s5, the recognition and extraction module 2 transmits the standard brick surface images to the calibration module 3, the calibration module 3 utilizes CompareHist function in Python Opencv to perform histogram correlation calculation on any two standard brick surface images to obtain a standard histogram correlation coefficient Asta;
S6, the calibration module 3 transmits the brick surface image of any standard brick to the discrimination module 4;
s7, the discrimination module 4 utilizes CompareHist function in Python Opencv to perform histogram correlation calculation on the brick surface image of the standard brick and the brick surface image of the brick to be selected to obtain a correlation coefficient A of the histogram to be selected1;
S8, when A is1>AstaAnd in time, the brick surface of the brick to be selected meets the requirement.
Compared with the existing construction site brick selection work of the plain bricks, the intelligent recognition method for the brick selection defects of the plain bricks adopts an artificial screening method relying on human eye vision perception, utilizes artificial intelligence means such as a computer vision technology and the like to intelligently recognize and compare the color difference of the plain bricks, realizes an intelligent and automatic brick selection flow of the plain bricks in batches, avoids a complicated working flow of observing and comparing the plain bricks one by the artificial screening method, and improves the working efficiency. And the color difference of the bare brick is subjected to digital quantitative evaluation, so that a corresponding self-adaptive color difference evaluation standard can be formed according to the requirements of the building appearance and the building style of different engineering projects, and the evaluation standard is not limited by the project requirements. In addition, compared with the visual perception qualitative evaluation of a manual screening method depending on human vision, the clear water brick color difference quantitative evaluation standard adopted by the invention has smaller discrete type of the discrimination result and higher accuracy of the discrimination result.
In a preferred embodiment, in the intelligent bare brick defect identification method, in S2, the image capture module 1 captures a standard brick photo and a candidate brick photo under the same lighting condition. The image acquisition module 1 adopts an industrial camera, a single lens reflex camera and a mobile phone camera, the resolution ratio has no high requirement, but the acquisition work of the standard brick picture and the picture of the brick to be selected uses the same shooting equipment with the same parameter under the same illumination condition, and the shooting angle is as vertical as possible to the brick surface of the plain brick.
As a preferred embodiment, in the intelligent bare brick defect identification method, S3 includes the following steps:
s3-1, the recognition and extraction module 2 receives the standard brick photo and the to-be-selected brick photo;
s3-2, denoising the standard brick photo and the to-be-selected brick photo; image noise removal can be carried out on the standard brick photo and the to-be-selected brick photo by utilizing a Gaussian filtering denoising principle so as to reduce the interference of noise in the image on the subsequent brick surface identification, segmentation and extraction work;
s3-3, performing graying processing on the standard brick picture and the picture of the brick to be selected; after graying processing, the standard brick picture and the picture of the brick to be selected are converted into a single-component image representation form of R, G and B from an RGB three-component image representation form, so that the running speed of the intelligent clear water brick defect identification system can be increased, and image banding distortion is avoided;
s3-4, acquiring four vertex coordinates of the brick surface of the bare brick in the standard brick picture and the picture of the brick to be selected, and acquiring an image of the brick surface of the standard brick and an image of the brick surface of the brick to be selected according to the four vertex coordinates; based on the fact that the size of the brick surface of the bare brick is a fixed rectangular shape, edge calculation can be carried out by using a Canny operator to obtain four vertex coordinates of the brick surface in an image, and then the brick surface image is segmented from a photo to form a standard brick surface image and a brick surface image of a brick to be selected;
and S3-5, performing binarization processing on the standard brick face image and the brick face image to be selected to set a small amount of background colors still existing in the image to be black.
In a preferred embodiment, in the intelligent bare brick defect identification method, S3 further includes performing color space conversion on the brick surface image of the standard brick and the brick surface image of the brick to be selected, converting the brick surface image from RGB space to XYZ space, and then converting the brick surface image to LAB space; according to the national standard GB/T18922-;
s5 further includes calculating the standard color difference value delta E of any two standard brick face images in the LAB spacesta(ii) a In LAB space, there is (Δ E)2=(ΔL)2+(Δa)2+(Δb)2Wherein, the delta E is a color difference value, the delta L is a brightness difference value which is more than 0, the surface to be measured is white and less than 0, and the surface to be measured is black. And delta a is the color difference value in the red and green directions, is more than 0, is reddish and is less than 0, and is greenish. Δ b is. . . And if the color difference value in the yellow-blue direction is greater than 0, the surface to be detected is yellow and less than 0, and the surface to be detected is blue. The color difference value delta E of the two images can be calculated according to the formula;
s7 further comprises the step of calculating to-be-selected color difference value delta E1 of the brick surface image of the standard brick and the brick surface image of the to-be-selected brick in an LAB space;
s8 also includes that when the condition that delta E1< delta Esta is met, the brick surface of the brick to be selected meets the requirement.
And meanwhile, the histogram correlation coefficient and the color difference value are quoted to judge whether the brick to be selected meets the use condition, so that the comparison accuracy can be improved.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.