Method and system for protecting fabricated building component finished product
By constructing a detection model and using feature enhancement layers for detection and defect analysis, the problem of quality degradation in prefabricated building components during transportation and storage is solved, efficient monitoring and defect identification is achieved, and the integrity of components and the safety of the building is ensured.
Patent Information
- Application Number
- CN202411702184.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
Prefabricated building components are susceptible to environmental changes, collisions and wear during transportation and storage, resulting in reduced quality or damage, and lack effective protection measures.
By collecting data on finished historical prefabricated building components, building inspection models, and using feature enhancement layers for detection and defect analysis, different levels of prompts are provided to ensure component integrity.
It realizes efficient monitoring and defect identification of prefabricated building components, improves detection accuracy and efficiency, reduces building safety risks, and ensures overall quality and reliability.
Smart Images

Figure CN119649218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building engineering, and more particularly to a method and system for protecting finished assembled building components. Background Art
[0002] At present, as prefabricated buildings gradually become the mainstream of the modern construction industry, the preparation, transportation and storage of prefabricated components are also receiving more and more attention. During transportation and storage, components are easily affected by environmental changes, collisions, wear and tear, etc., resulting in the degradation or damage of component quality, which in turn affects the overall project quality and safety. At present, there is still a lack of effective protection measures on the market, and it is impossible to effectively solve such problems.
[0003] Therefore, there is an urgent need for a new type of protection method and system to ensure the integrity of prefabricated building components, which is a problem that technical personnel in this field need to solve. Summary of the invention
[0004] In view of this, the present invention provides a method and system for protecting a finished assembled building component to solve the problems existing in the background technology.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A method for protecting a finished assembled building component, comprising:
[0007] By collecting data on historical finished prefabricated building components, a historical data set is obtained; the historical data set includes a collection of images of finished prefabricated building components;
[0008] Build a finished product inspection model for prefabricated building components and train it with historical data sets;
[0009] Embedding a feature enhancement layer into the finished product detection model of the prefabricated building component, wherein the feature enhancement layer is a feature enhancement layer for performing finished product detection;
[0010] Inputting a set of finished images of prefabricated building components to be inspected into the prefabricated building component finished product inspection model to obtain inspection results;
[0011] Different levels of prompts are given according to the test results obtained.
[0012] Optionally, the method further includes inputting the image set of the finished product of the prefabricated building component into the finished product defect detection model of the prefabricated building component, and outputting a parameter optimization result according to the feature enhancement layer in the finished product defect detection model of the prefabricated building component, wherein the parameter optimization result includes a detection distance, a detection time and a detection sensitivity;
[0013] Processing the assembled building component finished product image set according to the parameter optimization result, and outputting an optimized assembled building component finished product image set;
[0014] The output result is obtained based on the optimized set of finished product images of the prefabricated building components.
[0015] Optionally, obtaining the historical data set specifically includes: using a plurality of line array cameras to collect finished surface images of historical prefabricated building components from different angles;
[0016] The pixel area of the finished product of the historical prefabricated building component in the image is extracted through the segmentation model, and the skeleton form of the finished product area of the historical prefabricated building component is obtained by using the bending correction algorithm. Then, the image of the finished product of the historical prefabricated building component is transformed by using the deformation correction formula to obtain the corrected image of the finished product of the historical prefabricated building component. In the corrected image, the finished product of the historical prefabricated building component is completely vertical and located in the middle of the image.
[0017] Calculate the transformation relationship between the image pixels captured by each camera and the position of the real object, obtain the overlapping areas between the cameras and remove them;
[0018] The images retained by each camera are horizontally spliced to obtain the complete surface image of the historical prefabricated building component product. The complete surface image is processed to obtain the defect image and normal image of the historical prefabricated building component product, thereby forming a historical data set.
[0019] Optionally, the segmentation model uses a Unet semantic segmentation model. The bending correction algorithm first uses the segmentation model to extract the actual area of the finished prefabricated building component product, and then calculates the starting position and the ending position where the horizontal gray value is greater than 0, takes the average of the horizontal position, and performs median filtering on these data to filter out noise data to obtain the skeleton morphology of the finished area of the prefabricated building component; the center position of the finished area of the prefabricated building component in each row in the image:
[0020] p c (i) = [max(p f(i,j)>0 (i))+min(p f(i,j)>0 (i))] / 2
[0021] Among them, p f(i,j)>0 (i) represents the position of all pixels whose grayscale values are greater than 0 in the i-th row of the image; f(i,j) is the grayscale value of the i-th row and j-th column of the image;
[0022] The input of the Unet semantic segmentation model is the picture collected by the camera, and the output is a binary image, in which the area with a pixel value of 0 is the background, and the area with a pixel value of 1 is the finished product of the prefabricated building component.
[0023] Optionally, the deformation correction formula is as follows:
[0024]
[0025] ε=p c (i)-w / 2
[0026] Among them, f d (i, j) is the image grayscale of the corresponding point after deformation correction; f(i, j) is the grayscale value of the i-th row and j-th column on the image; w is the width of the image; ε is the intermediate variable; p c (i) is the center position of the finished product area of the prefabricated building components in each row of the image.
[0027] Optionally, the processing of the complete surface image specifically includes:
[0028] The background of the complete surface image of the finished product of the historical prefabricated building component is removed and the image is binarized to obtain a binary image;
[0029] Extract the edge of the binary image and dilate it once to obtain a contour edge dilated image;
[0030] Convert the complete surface image of the finished product of the historical prefabricated building component into a grayscale image, and then convert the grayscale image into a normalized gradient image;
[0031] The normalized gradient image is iteratively calculated in turn to obtain the image segmentation threshold Q, and the gradient binary image is obtained by segmentation using the image segmentation threshold Q;
[0032] The gradient binarization image is subtracted from the contour edge expansion image, and then the expansion and hole filling are performed to obtain the normal image of the finished surface of the historical prefabricated building components; the normal image is corroded, and finally the median filtering is performed to obtain the defective image of the finished surface of the historical prefabricated building components. The normal images and defective images of all historical prefabricated building components are recorded to form a historical data set.
[0033] Optionally, the calculation process of the gradient binary image is:
[0034] Calculate the mean of the maximum and minimum values of all pixels in the normalized gradient image and use it as the initial pre-segmentation value;
[0035]
[0036] In the formula, G max is the maximum gradient value among all pixel gradient values in the normalized gradient image; G min is the minimum gradient value among all pixel gradient values in the normalized gradient image; T0 is the initial pre-segmentation value;
[0037] Then calculate the pre-segmentation difference each time by the following formula:
[0038] ΔT=|T n+1 -T n |
[0039] Where ΔT is the pre-segmentation difference; T n is the pre-segmentation value calculated for the nth iteration; T n+1 is the pre-segmentation value calculated for the n+1th iteration; n is the number of iterations;
[0040] The calculation is iterated until the pre-segmentation difference is less than 0.01, and then the normalized gradient image segmentation threshold Q is obtained by:
[0041] Q=T n
[0042] Where Q is the segmentation threshold; T n is the pre-segmentation value calculated for the nth iteration; n is the number of iterations;
[0043] Scan each pixel of the normalized gradient image. If the gradient value of the pixel is greater than the segmentation threshold Q, the pixel is assigned a value of 1, otherwise it is assigned a value of 0, thereby obtaining a gradient binary image.
[0044] Optionally, the dilation is performed using the following formula to complete the morphological dilation to obtain the image result;
[0045] R1=A⊕S={a|(S v )+a∪A≠φ}
[0046] Where R1 is the dilated image result; A is the image to be dilated; a is a pixel in A; S is the circular structure element; S v is a symmetric set of S; φ is an empty set.
[0047] Optionally, the providing of different levels of prompts according to the obtained detection results is specifically:
[0048] If there are defects in the finished product of the prefabricated building component to be tested, it means that the finished product is unqualified and a red prompt is displayed;
[0049] If the inspection results of the finished prefabricated building components to be inspected are normal, it means that the finished product is qualified and green processing is carried out.
[0050] A protective system for a finished assembled building component, comprising:
[0051] A data collection module, which collects data on historical finished prefabricated building components to obtain a historical data set; the historical data set includes a collection of images of finished prefabricated building components;
[0052] Model building module, which builds a finished product detection model for prefabricated building components and trains it with historical data sets;
[0053] A model optimization module, embedding a feature enhancement layer into the finished product detection model of the prefabricated building component, wherein the feature enhancement layer is a feature enhancement layer for finished product detection;
[0054] A detection result output module inputs the image set of the finished product of the prefabricated building component to be detected into the finished product detection model of the prefabricated building component to obtain the detection result;
[0055] The protection warning module gives different levels of prompts based on the detection results obtained.
[0056] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method and system for protecting finished products of prefabricated building components, which realizes efficient monitoring and defect identification of building components through advanced detection and data processing technologies. The method uses historical data sets and feature enhancement layers to build an accurate detection model, which can carefully analyze the quality of prefabricated components and provide grading prompts based on the detection results. This process not only improves the accuracy and efficiency of detection, but also helps to timely discover and deal with potential defects, thereby reducing building safety risks and ensuring the overall quality and reliability of prefabricated buildings. At the same time, efficient image processing and defect analysis are also realized, providing a scientific basis for the production and quality control of prefabricated buildings. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0058] Figure 1 A schematic diagram of the method provided by the present invention;
[0059] Figure 2 This is a schematic diagram of the system structure provided by the present invention. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] The embodiment of the present invention discloses a method for protecting a finished assembled building component. Figure 1 As shown, including:
[0062] By collecting data on historical finished products of prefabricated building components, a historical data set is obtained; the historical data set includes a collection of images of finished products of prefabricated building components;
[0063] Build a finished product inspection model for prefabricated building components and train it with historical data sets;
[0064] Embedding the feature enhancement layer into the finished product detection model of the prefabricated building component, wherein the feature enhancement layer is a feature enhancement layer for finished product detection;
[0065] Inputting a collection of finished images of prefabricated building components to be inspected into a prefabricated building component finished product inspection model to obtain inspection results;
[0066] Different levels of prompts are given according to the test results obtained.
[0067] Specifically, a feature enhancement layer is embedded in the finished product detection model of prefabricated building components, wherein the feature enhancement layer is an excitation function for optimizing the neural network model, which is used to introduce nonlinear factors into the neural network model to make the obtained output results more accurate. For example, according to historical detection data and detection results, it is known that in the detection time period from 8 am to 8 pm, the detection result at noon is closest to the true result, while other time periods will produce errors of different sizes. The nonlinear relationship between the detection time period and the detection error is obtained as a feature enhancement layer, and the input parameters that affect the detection time period are optimized. In the neural network model, excitation functions such as detection distance, detection time and detection sensitivity are introduced to excite the finished product detection model of prefabricated building components, so that the detection distance and detection time will affect the output results of the finished product detection model of prefabricated building components, so that the output results are closer to the true detection results.
[0068] In a specific embodiment, the method further includes inputting the assembled building component finished product image set into the assembled building component finished product defect detection model, and outputting parameter optimization results according to the feature enhancement layer in the assembled building component finished product defect detection model, wherein the parameter optimization results include detection distance and detection time;
[0069] Processing the finished product image set of the prefabricated building components according to the parameter optimization result, and outputting the optimized finished product image set of the prefabricated building components;
[0070] Based on the optimized set of finished images of prefabricated building components, the output results are obtained.
[0071] In a specific embodiment, obtaining the historical data set specifically includes: using four line array cameras to collect finished surface images of historical prefabricated building components from different angles;
[0072] The pixel area of the finished product of the historical prefabricated building component in the image is extracted through the segmentation model, and the skeleton form of the finished product area of the historical prefabricated building component is obtained by using the bending correction algorithm. Then, the image of the finished product of the historical prefabricated building component is transformed by using the deformation correction formula to obtain the corrected image of the finished product of the historical prefabricated building component. In the corrected image, the finished product of the historical prefabricated building component is completely vertical and located in the middle of the image.
[0073] Calculate the transformation relationship between the image pixels captured by each camera and the position of the real object, obtain the overlapping areas between the cameras and remove them;
[0074] The images retained by each camera are horizontally spliced to obtain the complete surface image of the historical prefabricated building component product. The complete surface image is processed to obtain the defect image and normal image of the historical prefabricated building component product, thereby forming a historical data set.
[0075] In a specific embodiment, the segmentation model uses the Unet semantic segmentation model. The bending correction algorithm first uses the segmentation model to extract the actual area of the finished prefabricated building component. Then, by calculating the starting position and the ending position where the horizontal gray value is greater than 0, the horizontal position is averaged, and the data are median filtered to filter out the noise data to obtain the skeleton morphology of the finished area of the prefabricated building component; the center position of the finished area of the prefabricated building component in each row in the image:
[0076] p c (i) = [max(p f(i,j)>0 (i))+min(p f(i,j)>0 (i))] / 2
[0077] Among them, p f(i,j)>0 (i) represents the position of all pixels whose grayscale values are greater than 0 in the i-th row of the image; f(i,j) is the grayscale value of the i-th row and j-th column of the image;
[0078] The input of the Unet semantic segmentation model is the picture collected by the camera, and the output is a binary image, in which the area with a pixel value of 0 is the background, and the area with a pixel value of 1 is the finished product of the prefabricated building component.
[0079] In a specific embodiment, the deformation correction formula is as follows:
[0080]
[0081] ε=p c (i)-w / 2
[0082] Among them, f d (i, j) is the image grayscale of the corresponding point after deformation correction; f(i, j) is the grayscale value of the i-th row and j-th column on the image; w is the width of the image; ε is the intermediate variable; p c (i) is the center position of the finished product area of the prefabricated building components in each row of the image.
[0083] The mapping relationship between the camera coordinates and the object coordinates is calculated through the camera position, and the overlapping pixels between the cameras are analyzed for interception. The effective range of each camera shooting the finished prefabricated building component is set to 90 degrees, the distance between the camera center and the center of the finished prefabricated building component is d, the camera focal length is f, and the radius of the finished prefabricated building component is r; α is the angle between the camera and the two tangent lines of the outer edge of the photographed rod:
[0084]
[0085] w b The width of the finished area of the prefabricated building component captured for the image;
[0086]
[0087] w b′ is the effective bar area width in the image:
[0088]
[0089] w b With w b′ The difference is the overlapped area between the cameras. The overlapped areas of the four cameras are filtered out to obtain the coordinates of their respective valid finished product areas. By stitching the valid finished product areas of each camera in a counterclockwise order in the horizontal direction, a complete unfolded view of the finished product surface can be obtained.
[0090] In a specific embodiment, processing the complete surface image specifically includes:
[0091] The background of the complete surface image of the finished product of the historical prefabricated building component is removed and the image is binarized to obtain a binary image;
[0092] Extract the edge of the binary image and dilate it once to obtain a contour edge dilated image;
[0093] Convert the complete surface image of the finished product of the historical prefabricated building component into a grayscale image, and then convert the grayscale image into a normalized gradient image;
[0094] Among them, the complete surface image is converted into a grayscale image, and then calculated using the following formula:
[0095]
[0096] Where: Sobel operator h1 adopts
[0097] Then calculate the gradient value using the following formula.
[0098]
[0099] Then all pixel data are normalized by the following formula;
[0100]
[0101] Get a normalized gradient image.
[0102] The normalized gradient image is iteratively calculated in turn to obtain the image segmentation threshold Q, and the gradient binary image is obtained by segmentation using the image segmentation threshold Q;
[0103] Among them, the calculation process of the gradient binary image is:
[0104] Calculate the mean of the maximum and minimum values of all pixels in the normalized gradient image and use it as the initial pre-segmentation value;
[0105]
[0106] In the formula, G max is the maximum gradient value among all pixel gradient values in the normalized gradient image; G min is the minimum gradient value among all pixel gradient values in the normalized gradient image; T0 is the initial pre-segmentation value;
[0107] Then calculate the first set of gradient mean G by the following first and second formulas respectively: group1 and the second set of gradient mean G group2 ;
[0108]
[0109]
[0110] In the formula, the value used for the weight coefficient Z(i,j) is 1;
[0111] The n+1th iteration pre-segmentation value is then calculated using the following formula.
[0112]
[0113] Then calculate the pre-segmentation difference each time by the following formula:
[0114] ΔT=|T n+1 -T n |
[0115] Where ΔT is the pre-segmentation difference; T n is the pre-segmentation value calculated for the nth iteration; T n+1 is the pre-segmentation value calculated for the n+1th iteration; n is the number of iterations;
[0116] The calculation is iterated until the pre-segmentation difference is less than 0.01, and then the normalized gradient image segmentation threshold Q is obtained by:
[0117] Q=T n
[0118] Where Q is the segmentation threshold; T n is the pre-segmentation value calculated for the nth iteration; n is the number of iterations;
[0119] Scan each pixel of the normalized gradient image. If the gradient value of the pixel is greater than the segmentation threshold Q, the pixel is assigned a value of 1, otherwise it is assigned a value of 0, thereby obtaining a gradient binary image.
[0120] The gradient binarization image is subtracted from the contour edge expansion image, and then the expansion and hole filling are performed to obtain the normal image of the finished surface of the historical prefabricated building components; the normal image is corroded, and finally the median filtering is performed to obtain the defective image of the finished surface of the historical prefabricated building components. The normal images and defective images of all historical prefabricated building components are recorded to form a historical data set.
[0121] The difference image is obtained by subtracting the contour edge dilation image from the gradient binary image, and a 1-pixel radius circular structure element is used. To complete the morphological expansion, and then complete the area filling by the following formula;
[0122] F p =(F p-1 E)∩D c , F p =F p-1
[0123] Where: E uses a four-connected domain Then, a normal image of the finished surface of the historical prefabricated building component is obtained.
[0124] Next, the morphological erosion is completed by the following formula to obtain the erosion map of the difference image.
[0125]
[0126] Where: W is a circular structure element with a radius of 2 pixels.
[0127] The erosion map of the difference image is subjected to a 4×4 median filter to obtain the surface defect image of the finished product of the historical prefabricated building components.
[0128] In a specific embodiment, the dilation is performed using the following formula to complete the morphological dilation to obtain the image result;
[0129] R1=A⊕S={a|(S v )+a∪A≠φ}
[0130] Where R1 is the dilated image result; A is the image to be dilated; a is a pixel in A; S is the circular structure element; S v is a symmetric set of S; φ is an empty set.
[0131] In a specific embodiment, different levels of prompts are given according to the obtained detection results:
[0132] If there are defects in the finished product of the prefabricated building component to be tested, it means that the finished product is unqualified and a red prompt is displayed;
[0133] If the inspection results of the finished prefabricated building components to be inspected are normal, it means that the finished product is qualified and green processing is carried out.
[0134] A protective system for finished assembled building components, such as Figure 2 As shown, including:
[0135] A data collection module collects data on historical prefabricated building component finished products to obtain a historical data set; the historical data set includes a collection of images of prefabricated building component finished products;
[0136] Model building module, which builds a finished product detection model for prefabricated building components and trains it with historical data sets;
[0137] A model optimization module embeds a feature enhancement layer into a finished product detection model of prefabricated building components, wherein the feature enhancement layer is a feature enhancement layer for finished product detection;
[0138] The detection result output module inputs the image set of the finished product of the prefabricated building component to be detected into the finished product detection model of the prefabricated building component to obtain the detection result;
[0139] The protection warning module gives different levels of prompts based on the detection results obtained.
[0140] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0141] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for protecting a finished assembled building component, characterized in that: include: By collecting data on historical finished prefabricated building components, a historical data set is obtained; the historical data set includes a collection of images of finished prefabricated building components; Build a finished product inspection model for prefabricated building components and train it with historical data sets; Embedding a feature enhancement layer into the finished product detection model of the prefabricated building component, wherein the feature enhancement layer is a feature enhancement layer for finished product detection; Inputting a set of finished images of prefabricated building components to be inspected into the prefabricated building component finished product inspection model to obtain inspection results; Different levels of prompts are given according to the test results obtained.
2. A method for protecting a finished assembled building component according to claim 1, characterized in that: The method further includes inputting the assembled building component finished product image set into the assembled building component finished product defect detection model, and outputting parameter optimization results according to the feature enhancement layer in the assembled building component finished product defect detection model, wherein the parameter optimization results include detection distance, detection time and detection sensitivity; Processing the assembled building component finished product image set according to the parameter optimization result, and outputting an optimized assembled building component finished product image set; The output result is obtained based on the optimized set of finished product images of the prefabricated building components.
3. A method for protecting a finished assembled building component according to claim 1, characterized in that: The obtaining of the historical data set specifically includes: using a plurality of linear array cameras to collect finished surface images of historical prefabricated building components from different angles; The pixel area of the finished product of the historical prefabricated building component in the image is extracted through the segmentation model, and the skeleton form of the finished product area of the historical prefabricated building component is obtained by using the bending correction algorithm. Then, the image of the finished product of the historical prefabricated building component is transformed by using the deformation correction formula to obtain the corrected image of the finished product of the historical prefabricated building component. In the corrected image, the finished product of the historical prefabricated building component is completely vertical and located in the middle of the image. Calculate the transformation relationship between the image pixels captured by each camera and the position of the real object, obtain the overlapping areas between the cameras and remove them; The images retained by each camera are horizontally spliced to obtain the complete surface image of the historical prefabricated building component product. The complete surface image is processed to obtain the defect image and normal image of the historical prefabricated building component product, thereby forming a historical data set.
4. A method for protecting a finished assembled building component according to claim 3, characterized in that: The segmentation model uses the Unet semantic segmentation model. The bending correction algorithm first uses the segmentation model to extract the actual area of the finished product of the prefabricated building component, and then calculates the starting position and the ending position where the horizontal gray value is greater than 0, takes the average of the horizontal position, and performs median filtering on these data to filter out noise data, thereby obtaining the skeleton morphology of the finished product area of the prefabricated building component; The center position of the finished area of the prefabricated building components in each row of the image: p c (i)=[max(p f(i,j)>0 (i))+min(p f(i,j)>0 (i))] / 2 Among them, p f(i,j)>0 (i) represents the position of all pixels whose grayscale values are greater than 0 in the i-th row of the image; f(i,j) is the grayscale value of the i-th row and j-th column of the image; The input of the Unet semantic segmentation model is the picture collected by the camera, and the output is a binary image, in which the area with a pixel value of 0 is the background, and the area with a pixel value of 1 is the finished product of the prefabricated building component.
5. A method for protecting a finished assembled building component according to claim 3, characterized in that: The deformation correction formula is as follows: e=p c (i)-w / 2 Among them, f d (i, j) is the image grayscale of the corresponding point after deformation correction; f(i, j) is the grayscale value of the i-th row and j-th column on the image; w is the width of the image; ε is the intermediate variable; p c (i) is the center position of the finished product area of the prefabricated building components in each row of the image.
6. A method for protecting a finished assembled building component according to claim 3, characterized in that: The processing of the complete surface image specifically includes: The background of the complete surface image of the finished product of the historical prefabricated building component is removed and the image is binarized to obtain a binary image; Extract the edge of the binary image and dilate it once to obtain a contour edge dilated image; Convert the complete surface image of the finished product of the historical prefabricated building component into a grayscale image, and then convert the grayscale image into a normalized gradient image; The normalized gradient image is iteratively calculated in turn to obtain the image segmentation threshold Q, and the gradient binary image is obtained by segmentation using the image segmentation threshold Q; The gradient binarization image is subtracted from the contour edge expansion image, and then the expansion and hole filling are performed to obtain the normal image of the finished surface of the historical prefabricated building components; the normal image is corroded, and finally the median filtering is performed to obtain the defective image of the finished surface of the historical prefabricated building components. The normal images and defective images of all historical prefabricated building components are recorded to form a historical data set.
7. A method for protecting a finished assembled building component according to claim 6, characterized in that: The calculation process of the gradient binary image is: Calculate the mean of the maximum and minimum values of all pixels in the normalized gradient image and use it as the initial pre-segmentation value; In the formula, G max is the maximum gradient value among all pixel gradient values in the normalized gradient image; G min is the minimum gradient value among all pixel gradient values in the normalized gradient image; T0 is the initial pre-segmentation value; Then calculate the pre-segmentation difference each time by the following formula: ΔT=|T n+1 -T n | Where ΔT is the pre-segmentation difference; T n is the pre-segmentation value calculated for the nth iteration; T n+1 is the pre-segmentation value calculated for the n+1th iteration; n is the number of iterations; The calculation is iterated until the pre-segmentation difference is less than 0.01, and then the normalized gradient image segmentation threshold Q is obtained by: Q=T n Where Q is the segmentation threshold; T n is the pre-segmentation value calculated for the nth iteration; n is the number of iterations; Scan each pixel of the normalized gradient image. If the gradient value of the pixel is greater than the segmentation threshold Q, the pixel is assigned a value of 1, otherwise it is assigned a value of 0, thereby obtaining a gradient binary image.
8. A method for protecting a finished assembled building component according to claim 5, characterized in that: The following formula is used to complete the morphological expansion and obtain the image result; Where R1 is the dilation image result; A is the image to be dilated; a is a pixel in A; S is the circular structure element; S v is the symmetric set of S; φ is the empty set.
9. A method for protecting a finished assembled building component according to claim 1, characterized in that: The different levels of prompts given according to the obtained test results are specifically: If there are defects in the finished product of the prefabricated building component to be tested, it means that the finished product is unqualified and a red prompt is displayed; If the inspection results of the finished prefabricated building components to be inspected are normal, it means that the finished product is qualified and green processing is carried out.
10. A protective system for finished assembled building components, characterized in that: A method for protecting a finished assembled building component according to any one of claims 1 to 9, comprising: A data collection module, which collects data on historical finished prefabricated building components to obtain a historical data set; the historical data set includes a collection of images of finished prefabricated building components; Model building module, which builds a finished product detection model for prefabricated building components and trains it with historical data sets; A model optimization module, embedding a feature enhancement layer into the finished product detection model of the prefabricated building component, wherein the feature enhancement layer is a feature enhancement layer for finished product detection; A detection result output module inputs the image set of the finished product of the prefabricated building component to be detected into the finished product detection model of the prefabricated building component to obtain the detection result; The protection warning module gives different levels of prompts based on the detection results obtained.