Ancient building restoration effect evaluation method based on image enhancement

Through image enhancement technology, combined with block average grayscale and channel attention mechanism, the problems of tiny defects and noise suppression in the repair evaluation of ancient buildings are solved, achieving a more efficient evaluation effect.

CN120235778BActive Publication Date: 2025-09-02CHINA CONSTR FIFTH ENG DIV CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510725414.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-02
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

The prior art is difficult to capture small local defects in the evaluation of the repair effect of ancient buildings, resulting in a lack of targeted evaluation results and difficulty in taking into account noise suppression and micro-crack gradient response, resulting in poor evaluation accuracy.

Method used

Using an image enhancement method, the evaluation area is automatically positioned through block average grayscale, and an adaptive noise suppression and channel attention mechanism are introduced, combined with fractional gradient operators, detail reinforcement and noise suppression are carried out to improve the evaluation accuracy.

Benefits of technology

It improves the pertinence and accuracy of the repair evaluation of ancient buildings, can better highlight local defects and retain the overall structure, and enhance the evaluation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235778B_ABST
    Figure CN120235778B_ABST
Patent Text Reader

Abstract

The present invention discloses an ancient building repair effect evaluation method based on image enhancement, which includes image acquisition, image enhancement, establishing an ancient building repair effect evaluation model, and ancient building repair effect evaluation. The present invention belongs to the field of image processing, and specifically refers to an ancient building repair effect evaluation method based on image enhancement. This solution locates the evaluation area based on the block average grayscale, and performs detail enhancement while retaining the structure; thereby improving the final repair evaluation effect; by defining a repair activation function and introducing a channel adaptive threshold, adaptive noise suppression and significant texture retention are performed, and a fractional gradient operator is introduced to take into account local smoothing and long-range dependence, and the gradient response of small cracks and texture edges is amplified; thereby improving the accuracy of the repair effect evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an ancient building restoration effect evaluation method based on image enhancement. Background Art

[0002] The evaluation method for the restoration of ancient buildings involves collecting images of the buildings after restoration and related data, and then using image processing and enhancement, as well as the calculation of quantitative indicators, to comprehensively assess the quality of the restoration results. However, general evaluation methods for the restoration of ancient buildings focus on global comparison or color difference analysis, making it difficult to capture small local defects. This results in a lack of specificity in the evaluation results, which in turn leads to poor restoration evaluation results. General evaluation methods for the restoration of ancient buildings also struggle to balance noise suppression and microcrack gradient response, and are insufficiently sensitive to small cracks, erosion textures, and changes in illumination, resulting in poor accuracy in the restoration evaluation. Summary of the Invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an ancient building repair effect evaluation method based on image enhancement. The general ancient building repair effect evaluation method has the problem of focusing on global contrast or color difference analysis, which makes it difficult to capture small local defects, resulting in a lack of pertinence in the evaluation results, and thus leading to poor repair evaluation effects. This scheme automatically and accurately locates the evaluation area based on the block average grayscale, and performs detail reinforcement while retaining the structure; ensures the consistency of the overall contour while maximizing the highlighting of local defects; thereby improving the final repair evaluation effect; the general ancient building repair effect evaluation method has the problem of difficulty in balancing noise suppression and micro-crack gradient response, and is not sensitive enough to small cracks, erosion texture, and illumination changes, which leads to poor accuracy of repair effect evaluation. This scheme performs feature map attention fusion in the middle layer and introduces a channel attention mechanism to automatically highlight channels sensitive to cracks and erosion; by defining a repair activation function and introducing a channel adaptive threshold, adaptive noise suppression and significant texture retention are performed, and a fractional-order gradient operator is introduced to take into account local smoothness and long-range dependence, and amplify the gradient response of small cracks and texture edges; thereby improving the accuracy of repair effect evaluation.

[0004] The technical solution adopted by the present invention is as follows: The method for evaluating the restoration effect of ancient buildings based on image enhancement provided by the present invention comprises the following steps:

[0005] Step S1: image acquisition;

[0006] Step S2: image enhancement;

[0007] Step S3: Establishing an ancient building repair effect evaluation model;

[0008] Step S4: Evaluation of the restoration effect of ancient buildings.

[0009] Furthermore, in step S1, the image acquisition is to acquire the image of the historical ancient building repair; and the image of the historical ancient building repair is annotated, and the repair effect evaluation level is annotated; and the repair effect evaluation level is used as the image label.

[0010] Furthermore, in step S2, the image enhancement specifically includes the following steps:

[0011] Step S21: Automatically segment the weathered, dewy, highly reflective, and stained areas of the stone in the historical building repair image to locate the repaired area. The formula used is: ; ; ; Where N is the total number of pixels in the segmented block; n is the pixel index of the segmented block; is the pixel grayscale value; 、 and are the red, green, and blue channel intensities of the pixel, respectively; is the binary segmentation result; p is the pixel position; T is the grayscale threshold; is the average grayscale of the segmented block where the pixel position p is located;

[0012] Step S22: Priority assessment of surface defects of ancient buildings; introduce brightness term to assess the enhancement priority of each segmented block; the formula used is: ;in, is the enhancement priority score of pixel position p; is the weight coefficient; is the defect confidence; is the local depth, obtained by Canny edge detection, where high values ​​correspond to obvious gaps;

[0013] Step S23: Adaptive SSIM weighted fusion; decompose the original image into base details, enhance them separately and then fuse them; use guided filtering to smooth the original image to obtain the base layer, and then subtract the base layer from the original image to obtain the detail layer; enhance the base layer image by adaptive histogram equalization and enhance the detail layer by UnsharpMasking; complete global enhancement; according to the enhanced base layer and detail layers The structural similarity of the original image I is calculated, and the fusion weight is dynamically assigned to generate a final image that retains the overall outline and highlights local defects. The formula used is: ; ;in, is the final enhanced image; is the fusion weight; is a structural similarity index; and an image set for evaluating the effect of ancient building repair is obtained.

[0014] Furthermore, in step S3, the method of establishing an ancient building repair effect evaluation model divides the ancient building repair effect evaluation image set into a training set and a test set, and performs training based on a deep learning model; specifically, the method includes the following steps:

[0015] Step S31: Network architecture design; the backbone uses a lightweight convolutional network, with a custom activation function applied after each convolutional layer; attention fusion is performed on the feature maps in the intermediate layers, and a channel attention mechanism is introduced; the output layer uses softmax to output the evaluation level of the repair effect; the model uses the cross-entropy loss function; and the parameters are updated based on the gradient descent algorithm and the back-propagation algorithm.

[0016] Step S32: Define the repair activation function; Repair activation function Expressed as: ; Design channel adaptive threshold, expressed as: ; Where x is the activation function input; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; are trainable parameters learned through back-propagation; is a normalized index; is the u-th channel attention weight output by the intermediate layer through the channel attention mechanism; when When the output is always 0; when When , the denoising threshold is shifted on the input;

[0017] Step S33: Model judgment; set an evaluation threshold. When the evaluation accuracy of the trained ancient building repair effect evaluation model for the test set is higher than the evaluation threshold, the ancient building repair effect evaluation model is established; otherwise, the model is tuned based on the particle swarm search algorithm.

[0018] Furthermore, in step S4, the ancient building repair effect evaluation is based on the established ancient building repair effect evaluation model, and the ancient building repair image is collected in real time. After image enhancement, it is input into the ancient building repair effect evaluation model, and the repair effect evaluation level output by the model is used as the repair effect evaluation result.

[0019] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0020] (1) In view of the problem that the general evaluation methods for the restoration of ancient buildings focus on global comparison or color difference analysis, which makes it difficult to capture small local defects, resulting in a lack of pertinence in the evaluation results, and thus in poor restoration evaluation results, this solution automatically and accurately locates the evaluation area based on the average grayscale of the block, and reinforces the details while preserving the structure; ensures the consistency of the overall outline while maximizing the highlighting of local defects; and thus improves the final restoration evaluation effect.

[0021] (2) In view of the fact that the general evaluation method of the repair effect of ancient buildings has difficulty in balancing noise suppression and micro-crack gradient response, and is not sensitive enough to tiny cracks, erosion textures, and illumination changes, which leads to poor accuracy in repair effect evaluation, this scheme performs feature map attention fusion in the middle layer and introduces a channel attention mechanism to automatically highlight channels that are sensitive to cracks and erosion; by defining a repair activation function and introducing a channel adaptive threshold, adaptive noise suppression and significant texture retention are performed, and a fractional-order gradient operator is introduced to balance local smoothness and long-range dependence, and the gradient response of small cracks and texture edges is amplified; thereby improving the accuracy of repair effect evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A flow chart of the method for evaluating the effect of ancient building restoration based on image enhancement provided by the present invention;

[0023] Figure 2 Schematic diagram of the process of step S3.

[0024] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0026] In the description of the present invention, it should be understood that terms such as "up", "down", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the system or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.

[0027] Example 1, see Figure 1The present invention provides an ancient building restoration effect evaluation method based on image enhancement, which includes the following steps:

[0028] Step S1: Image acquisition: Acquire images of historical and ancient building restoration;

[0029] Step S2: Image enhancement: Under the premise of preserving the overall structure of the real restoration, the image of the historical building restoration is enhanced;

[0030] Step S3: Establish an ancient building restoration effect evaluation model; based on the enhanced historical building restoration images, the model is trained using a lightweight convolutional network combined with a custom activation function and attention mechanism;

[0031] Step S4: evaluating the effect of ancient building repairs; evaluating the effect of ancient building repairs on the images of the ancient building repairs based on the ancient building repair effect evaluation model.

[0032] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the image of the historical building repair is annotated and the repair effect evaluation level is annotated; the repair effect evaluation level is used as the image label.

[0033] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, image enhancement is to maximize the magnification of key details required for evaluation while retaining the overall structure after the actual repair. Specifically, the following steps are included:

[0034] Step S21: Automatically segment the weathered, dewy, highly reflective, and stained areas of the stone in the historical building repair image to locate the repaired area. The formula used is: ; ; ; Where N is the total number of pixels in the segmented block; n is the pixel index of the segmented block; is the pixel grayscale value; 、 and are the red, green, and blue channel intensities of the pixel, respectively; is the binary segmentation result; p is the pixel position; T is the grayscale threshold; is the average grayscale of the segmented block where the pixel position p is located;

[0035] Step S22: Priority assessment of surface defects of ancient buildings; introduce brightness term, combine texture confidence and edge depth, and evaluate the enhancement priority of each segmented block; the formula used is: ;in, is the enhancement priority score of pixel position p; is the weight coefficient; is the defect confidence given by the texture classifier; is the local depth, obtained by Canny edge detection, where high values ​​correspond to obvious gaps;

[0036] Step S23: Adaptive SSIM weighted fusion; decompose the original image into base details, enhance them separately and then fuse them to take into account the visibility of the overall outline and local defects; use guided filtering to smooth the edges of the original image to obtain the base layer, and then subtract the base layer from the original image to obtain the detail layer; apply adaptive histogram equalization to enhance the base layer image, and use UnsharpMasking to enhance the detail layer; complete global enhancement; according to the enhanced base layer and detail layers The structural similarity of the original image I is calculated, and the fusion weight is dynamically assigned to generate a final image that retains the overall outline and highlights local defects. The formula used is: ; ;in, is the final enhanced image; is the fusion weight; is a structural similarity index; and an image set for evaluating the effect of ancient building repair is obtained.

[0037] By performing the above operations, we can address the problem that general ancient building repair effect evaluation methods focus on global comparison or color difference analysis, which makes it difficult to capture tiny local defects, resulting in a lack of pertinence in the evaluation results, and thus leading to poor repair evaluation effects. This solution automatically and accurately locates the evaluation area based on the block average grayscale, and enhances details while preserving the structure; ensures the consistency of the overall outline while maximizing the highlighting of local defects; thereby improving the final repair evaluation effect.

[0038] Example 4, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S3, an ancient building repair effect evaluation model is established to divide the ancient building repair effect evaluation image set into a training set and a test set, and training is performed based on a deep learning model. Specifically, the following steps are included:

[0039] Step S31: Network architecture design; the backbone uses a lightweight convolutional network, with a custom activation function applied after each convolutional layer; attention fusion is performed on the feature maps in the intermediate layers, and a channel attention mechanism is introduced; the output layer uses softmax to output the evaluation level of the repair effect; the model uses the cross-entropy loss function; and the parameters are updated based on the gradient descent algorithm and the back-propagation algorithm.

[0040] Step S32: Define the repair activation function; Repair activation function Expressed as: ; Design channel adaptive threshold, expressed as: ; Where x is the activation function input; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; It is a trainable parameter learned through back-propagation, which automatically adjusts the noise suppression strength; is a normalized index; is the u-th channel attention weight output by the middle layer through the channel attention mechanism, which is used to emphasize those channels that are particularly sensitive to cracks and erosion details; when When , the output is always 0, filtering out small noise and irrelevant details; when When , it is equivalent to shifting the denoising threshold of the input to retain significant textures; combined with Automatically adapt to the lighting and material differences of different parts to highlight the real damaged areas;

[0041] Step S33: Model judgment; set an evaluation threshold. When the evaluation accuracy of the trained ancient building repair effect evaluation model for the test set is higher than the evaluation threshold, the ancient building repair effect evaluation model is established; otherwise, the model is tuned based on the particle swarm search algorithm.

[0042] By performing the above operations, we can address the problem that general ancient building repair effect evaluation methods have difficulty in balancing noise suppression and micro-crack gradient response, and are not sensitive enough to tiny cracks, erosion textures, and illumination changes, which leads to poor accuracy in repair effect evaluation. This solution performs feature map attention fusion in the middle layer and introduces a channel attention mechanism to automatically highlight channels that are sensitive to cracks and erosion; by defining a repair activation function and introducing a channel adaptive threshold, we perform adaptive noise suppression and significant texture retention, introduce a fractional-order gradient operator, take into account local smoothing and long-range dependence, and amplify the gradient response of small cracks and texture edges; thereby improving the accuracy of repair effect evaluation.

[0043] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, the ancient building repair effect evaluation is based on the established ancient building repair effect evaluation model. The ancient building repair image is collected in real time, and after image enhancement, it is input into the ancient building repair effect evaluation model. The repair effect evaluation level output by the model is used as the repair effect evaluation result.

[0044] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0045] While the embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions, and alterations can be made to the embodiments without departing from the principles and spirit of the invention.

[0046] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.

Claims

1. An ancient building restoration effect evaluation method based on image enhancement, characterized by: The method comprises the following steps: Step S1: Image acquisition: Acquire images of historical and ancient building restoration; Step S2: Image enhancement: Under the premise of preserving the overall structure of the real restoration, the image of the historical building restoration is enhanced; Step S3: Establish an ancient building restoration effect evaluation model; based on the enhanced historical building restoration images, the model is trained using a lightweight convolutional network combined with a custom activation function and attention mechanism; Step S4: evaluating the effect of ancient building repairs; evaluating the effect of the ancient building repair images based on the ancient building repair effect evaluation model; In step S3, the ancient building repair effect evaluation model is established to divide the ancient building repair effect evaluation image set into a training set and a test set, and training is performed based on a deep learning model; specifically, the following steps are included: Step S31: Network architecture design; the backbone uses a lightweight convolutional network, with a custom activation function applied after each convolutional layer; attention fusion is performed on the feature maps in the intermediate layers, and a channel attention mechanism is introduced; the output layer uses softmax to output the evaluation level of the repair effect; the model uses the cross-entropy loss function; and the parameters are updated based on the gradient descent algorithm and the back-propagation algorithm. Step S32: Define the repair activation function; Repair activation function Expressed as: ; Design channel adaptive threshold, expressed as: ; Where x is the activation function input; is the adaptive threshold on the u-th channel; and are the global mean and standard deviation on the u-th channel respectively; are trainable parameters learned through back-propagation; is a normalized index; is the u-th channel attention weight output by the intermediate layer through the channel attention mechanism; when When the output is always 0; when When , the denoising threshold is shifted on the input; Step S33: Model judgment; set an evaluation threshold. When the evaluation accuracy of the trained ancient building repair effect evaluation model for the test set is higher than the evaluation threshold, the ancient building repair effect evaluation model is established; otherwise, the model is tuned based on the particle swarm search algorithm.

2. The method for evaluating the restoration effect of ancient buildings based on image enhancement according to claim 1 is characterized in that: In step S2, the image enhancement specifically includes the following steps: Step S21: Automatically segment the weathered, dewy, highly reflective, and stained areas of the stone in the historical building repair image to locate the repaired area. The formula used is: ; ; ; Where N is the total number of pixels in the segmented block; n is the pixel index of the segmented block; is the pixel grayscale value; 、 and are the red, green, and blue channel intensities of the pixel, respectively; is the binary segmentation result; p is the pixel position; T is the grayscale threshold; is the average grayscale of the segmented block where the pixel position p is located; Step S22: Priority assessment of surface defects of ancient buildings; introduce brightness term to assess the enhancement priority of each segmented block; the formula used is: ;in, is the enhancement priority score of pixel position p; is the weight coefficient; is the defect confidence; is the local depth, obtained by Canny edge detection, where high values ​​correspond to obvious gaps; Step S23: Adaptive SSIM weighted fusion.

3. The method for evaluating the effect of ancient building restoration based on image enhancement according to claim 2 is characterized in that: In step S23, the adaptive SSIM weighted fusion is to decompose the original image into base details, enhance them separately and then fuse them; use guided filtering to smooth the original image with edge preservation to obtain a base layer, and then subtract the base layer from the original image to obtain a detail layer; Adaptive histogram equalization is applied to enhance the base layer image, and UnsharpMasking is used to enhance the detail layer; Complete global enhancement; According to the enhanced basal layer and detail layers The structural similarity of the original image I is calculated, and the fusion weight is dynamically assigned to generate a final image that retains the overall outline and highlights local defects. The formula used is: ; ;in, is the final enhanced image; is the fusion weight; is a structural similarity index; and an image set for evaluating the effect of ancient building repair is obtained.

4. The method for evaluating the restoration effect of ancient buildings based on image enhancement according to claim 3 is characterized in that: In step S1, the image of the historical building repair is annotated and the repair effect evaluation level is marked; the repair effect evaluation level is used as the image label.

5. The method for evaluating the restoration effect of ancient buildings based on image enhancement according to claim 4 is characterized in that: In step S4, the ancient building repair effect evaluation is based on the established ancient building repair effect evaluation model, and the ancient building repair image is collected in real time. After image enhancement, it is input into the ancient building repair effect evaluation model, and the repair effect evaluation level output by the model is used as the repair effect evaluation result.

Citation Information

Patent Citations

  • Method for evaluating building damage after natural disaster based on neural network

    CN114091897A

  • Endoscope image enhancement method, device, equipment and medium

    CN116109533A

  • Image defogging method and device, equipment and storage medium

    CN119067872A