File restoration system based on image enhancement

Through an archive repair system based on image enhancement, the problem of unsatisfactory repair effect caused by ignoring local damage differences in image enhancement in the prior art is solved, and the image detail clarity and overall visual nature are improved, ensuring the integrity and authenticity of image structure and content.

CN120219244AInactive Publication Date: 2025-06-27NEW GENERATION INTELLIGENT TECHNOLOGY DEVELOPMENT (SHANDONG) CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202510409769.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-06-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art ignores the complexity of image corruption and the difference between local damage during image enhancement, resulting in unsatisfactory or excessive enhancement of local repair effects, such as edge artifacts or texture distortion when oversharpened in detail processing.

Method used

An image enhancement-based archive repair system is adopted, including a high-frequency detail enhancement module, a texture pattern mapping module, a spectral data reconstruction module and a comprehensive evaluation module. The system processes high-frequency information through a high-pass filter to sharpen the detailed image while maintaining the smoothness of the low-frequency area; uses texture feature data to restore the texture and patterns of the damaged area; adjust and repair image colors based on spectral analysis; and finally performs image quality evaluation to ensure the restored image sharpness and color authenticity.

Benefits of technology

It realizes the synchronous improvement of image detail clarity and overall visual nature, ensures the integrity and authenticity of image structure and content, solves the problems of oversharpening, texture distortion, and color distortion in the traditional image enhancement process, and improves the authenticity of archive repair and the value of archive utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219244A_ABST
    Figure CN120219244A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, in particular to an archive restoration system based on image enhancement, and the system comprises a high-frequency detail enhancement module which receives a damaged archive image, processes high-frequency information through a high-pass filter, and obtains a high-frequency processed image; the high frequency processed image is sharpened while maintaining smoothness of the low frequency region, generating a detail enhanced image. According to the method, the high-frequency information of the damaged archive image is independently processed, the detail part in the image is independently extracted and sharpened, and meanwhile, the low-frequency region is kept smooth, so that the detail definition of the image and the overall visual naturalness are synchronously improved; and in the image texture repairing process, the texture of the undamaged area is analyzed, and key texture features are extracted and expanded, so that the texture and the pattern of the damaged area are accurately reconstructed, and the integrity and the authenticity of the image structure and the content are ensured.
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 enhancement, and particularly to an archive restoration system based on image enhancement. Background Art

[0002] Image enhancement technology refers to the process of processing images through computer algorithms to improve the visual effects of images, enhance the image quality and the recognizability of information, so as to more clearly and accurately express the content or details contained in the images.

[0003] In the prior art, in actual operation, the whole image is usually taken as the processing object, and only the visual effects and quality of the image are improved from the overall perspective, ignoring the complexity of image damage and the differences in local damage. The specific features such as high-frequency details, texture patterns, and material color information in the image are not distinguished specifically, which easily leads to unsatisfactory local restoration effects or over-enhancement. For example, when the details are processed with excessive sharpening, edge artifacts or texture distortion will occur. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of the present invention is to solve the deficiencies existing in the prior art, and to propose an archive restoration system based on image enhancement.

[0005] To achieve the above purpose, the present invention adopts the following technical solutions: An archive restoration system based on image enhancement includes: A high-frequency detail enhancement module, which receives a damaged archive image, processes high-frequency information through a high-pass filter to obtain a high-frequency processed image; sharpens the high-frequency processed image while maintaining the smoothness of the low-frequency region to generate a detail-enhanced image; A texture pattern mapping module, which analyzes the texture and pattern of the undamaged area based on the detail-enhanced image, extracts key texture features to obtain texture feature data; copies and extends the texture feature data to the damaged area to restore the damaged texture and pattern to generate a texture-restored image; A spectral data reconstruction module, which collects the material color data in the texture-restored image, performs spectral analysis to obtain the original spectral data; based on the original spectral data, simulates the spectral change data during the material aging process, adjusts and repairs the image color to restore the color distortion caused by material aging or chemical changes to generate a spectral-adjusted image; A comprehensive evaluation module, which obtains the spectral-adjusted image, evaluates the image quality, checks the clarity and color authenticity of the image to obtain the restored image.

[0006] Preferably, the steps for obtaining the high-frequency processed image are as follows: receiving the damaged file image, reading the pixel matrix information of the image, extracting the gray values of all pixel points, constructing an image gray matrix, calculating the pixel intensity distribution based on the image gray matrix, extracting the gradient information of each pixel point, and screening the image high-frequency data according to the gradient information; Based on the image high-frequency data, setting the cut-off frequency parameter of the high-pass filter, calculating the convolution operation of the high-frequency signal and the filter response function, performing frequency domain transformation on the image matrix, and using the high-pass filter to suppress the interference of the low-frequency components to generate enhanced high-frequency information; Based on the enhanced high-frequency information, performing inverse frequency domain transformation on the original image, reconstructing the enhanced high-frequency information into the image spatial domain, and performing boundary adjustment to match the original image size to generate the high-frequency processed image.

[0007] Preferably, the steps for obtaining the detail-enhanced image are as follows: receiving the high-frequency processed image, calculating the second derivative of the image using the Laplace operator, and superimposing the pixel gradient values to obtain the image after Laplace transformation; Based on the image after Laplace transformation, performing low-frequency region smoothing processing, using bilateral filtering, and adjusting the pixel values according to the spatial neighborhood relationship of the image to obtain the detail-enhanced image.

[0008] Preferably, the steps for obtaining the texture feature data are as follows: based on the detail-enhanced image, dividing the pixel grid of the undamaged area, extracting the gray values of the pixel points in each grid, constructing a pixel gradient direction matrix by calculating the gradient direction change of the adjacent pixel points in the grid, and simultaneously obtaining the curvature change information of each grid. Combining the gradient direction matrix and the curvature information, screening the pixel regions with continuous features to generate the texture data of the undamaged area; According to the texture data of the undamaged area, calculating the texture structure composite factor, and the calculation formula is: ; where, represents the texture structure composite factor, and are the gradient values of the pixel point in the horizontal and vertical directions respectively, represents the curvature change amount of the pixel point in the local area, represents the spatial correlation factor between all pixel points in the pixel region, and are the boundaries of the gradient integral, represents the number of pixel points included in the curvature calculation, represents the number of pixel point groups included in the spatial correlation calculation; Based on the texture structure composite factor, select the region with the most significant change in texture features to generate texture feature data.

[0009] Preferably, the steps for obtaining the texture restoration image are as follows: Based on the texture feature data, determine the pixel grid of the damaged area, and analyze the pixel distribution of adjacent undamaged areas to form preliminary texture mapping data; According to the preliminary texture mapping data, calculate the optimal matching factor for the pixel points in the damaged area. The expression is: ; Where, represents the optimal matching factor, and respectively represent the gray values of the damaged area and the undamaged area at the pixel point , represents the Euclidean distance between the th pixel point in the damaged area and the nearest undamaged pixel point, and are the pixel ranges for integral calculation, is the total number of pixel points to be matched in the damaged area; Based on the optimal matching factor, perform pixel filling on the damaged area to generate a texture restoration image.

[0010] Preferably, the steps for obtaining the original spectral data are as follows: Use a spectral imager to scan the texture restoration image, capture the color information of each area in the image, and measure the light reflectance at different spectral wavelengths for each pixel point to obtain pixel point spectral reflectance data; Based on the pixel point spectral reflectance data, correct color difference and offset, and at the same time remove noise and outliers through filtering to obtain the original spectral data.

[0011] Preferably, the steps for obtaining the spectral adjustment image are as follows: Based on the original spectral data, calculate the change trend of spectral reflectance at each wavelength, select the spectral band most significantly affected by aging to obtain simulated aging spectral data; According to the simulated aging spectral data, calculate the restored color value. The calculation formula is: ; Where, represents the restored color value, is the color value before aging, is the spectral reflectance of the current pixel point, is the spectral reflectance corresponding to the aging state, is the time factor, indicating the time experienced by the material aging, is the aging response coefficient, representing the sensitivity of the material to environmental changes, is the light intensity, is the environmental humidity, is the oxidation influence factor; Based on the repaired color value, globally adjust the color space of the entire image, apply repair pixel by pixel, adjust the color offset, and generate a spectral adjustment image.

[0012] Preferably, the steps for obtaining the repaired image are: obtaining the spectral adjustment image, dividing the image into multiple regions of a fixed size, extracting pixel gradient, contrast, and color distribution features for each region, and generating basic image quality data; Based on the basic image quality data, calculate the comprehensive quality score of the image. The calculation formula is: ; wherein, represents the comprehensive quality score of the image, is the gradient amplitude of the th pixel point, is the local color uniformity of the th region, and are the average values of the blue channel and the red channel of the whole image respectively, is the total number of pixel points, is the number of image segmentation regions; Based on the comprehensive quality score, judge the image enhancement effect to obtain the repaired image.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In the present invention, by separately processing the high-frequency information of the damaged archival image, the detailed parts in the image are independently extracted and sharpened, while ensuring that the low-frequency region remains smooth, so as to simultaneously improve the clarity of the image details and the overall visual naturalness; and in the process of repairing the image texture, by using the texture analysis of the undamaged region, the key texture features are extracted and extended to complete the precise reconstruction of the texture and pattern of the damaged region, ensuring the integrity and authenticity of the image structure and content; in the color repair stage, based on the collection and analysis of the spectral information of the material itself, the color changes caused by material aging are simulated, and the image color is dynamically adjusted and repaired according to the actual spectral data to truly restore the original color and visual effect of the material; in addition, the overall quality of the repaired image is evaluated to further ensure the consistency of the image color authenticity and visual effect, solve the problems of oversharpening, texture distortion, and color distortion that are prone to occur in the traditional image enhancement process, and improve the authenticity of archival repair and the archival utilization value. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is the system flow chart of the present invention. Specific embodiments

[0015] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0016] Please refer to Figure 1 , the present invention provides a technical solution: An archive restoration system based on image enhancement includes: A high-frequency detail enhancement module, which receives a damaged archive image, processes high-frequency information through a high-pass filter to obtain a high-frequency processed image; sharpens the high-frequency processed image while maintaining the smoothness of the low-frequency region to generate a detail-enhanced image; A texture pattern mapping module, which analyzes the texture and pattern of the undamaged area based on the detail-enhanced image, extracts key texture features to obtain texture feature data; copies and extends the texture feature data to the damaged area to restore the damaged texture and pattern and generate a texture-restored image; A spectral data reconstruction module, which collects the material color data in the texture-restored image, performs spectral analysis to obtain the original spectral data; based on the original spectral data, simulates the spectral change data during the material aging process, adjusts and repairs the image color, and restores the color distortion caused by material aging or chemical changes to generate a spectrally adjusted image; A comprehensive evaluation module, which obtains the spectrally adjusted image, evaluates the image quality, checks the clarity and color authenticity of the image, and obtains the restored image.

[0017] The steps for obtaining the high-frequency processed image are as follows: receiving a damaged archive image, reading the pixel matrix information of the image, extracting the gray values of all pixel points, constructing an image gray matrix, calculating the pixel intensity distribution based on the image gray matrix, and extracting the gradient information of each pixel point, and screening the image high-frequency data according to the gradient information; Based on the image high-frequency data, setting the cut-off frequency parameter of the high-pass filter, calculating the convolution operation of the high-frequency signal and the filter response function, performing a frequency domain transformation on the image matrix, and using the high-pass filter to suppress the interference of the low-frequency component to generate enhanced high-frequency information; Based on the enhanced high-frequency information, performing an inverse frequency domain transformation on the original image, reconstructing the enhanced high-frequency information into the image spatial domain, and performing boundary adjustment to match the original image size to generate a high-frequency processed image.

[0018] Specifically, receive the damaged archival image. After reading all the pixels, store their grayscale values in a two-dimensional array and establish an index sequence based on the image width and height. Statistically analyze the intensity pixel by pixel to form pixel intensity distribution data. Extract the grayscale value at each position and confirm whether the grayscale value belongs to the pre-set available range (for example, 0 to 255 means all grayscale levels are retained without exclusion) by comparing within the range of 0 to 255. Then calculate the vertical and horizontal differences of adjacent pixels to obtain the local gradient magnitude. After statistically obtaining the gradient set of the entire image, calculate the global gradient average value. and the standard deviation ; Assume that it is obtained from a batch of 50 similar damaged archival images and , set the threshold to be , so , when the gradient of a certain pixel is greater than 10, it is determined as a high-frequency signal contribution point. At this time, retain the index of such pixels and register it in the high-frequency data index table. Otherwise, it is classified as a low-frequency component. If the gradients of some pixels are close to 10, one-to-one positioning difference calculation can be performed on their surrounding pixels again and check whether it is within the effective grayscale range of 0 to 255. If it is still greater than or equal to 10, continue to retain it. Finally, all pixels with a gradient higher than 10 are obtained as the image high-frequency data. Summarize the coordinates and their grayscale gradient information of these pixel points to obtain the image high-frequency data.

[0019] Based on the image high-frequency data, after mapping the high-frequency index corresponding to the pixel point into the amplitude distribution in the frequency domain, perform frequency domain conversion on the image matrix using the fast Fourier transform. Determine the cut-off frequency of the high-pass filter in the obtained spectrum. The specific method is to first select a basic reference according to the spectrum energy distribution of typical images. For example, uniformly take several sampling points between 0 and 0.5 times the sampling rate, and statistically analyze the percentage of spectrum energy at each sampling point. Assume that the cumulative energy ratio of a certain image at 0.12 times the sampling rate is 70%, and the cumulative energy ratio at 0.18 times the sampling rate reaches 90%. Then, the cut-off frequency can be selected as 0.15 times the sampling rate according to experience, or the cut-off frequency can be further fine-tuned based on the batch measurement values of similar images. When the cut-off frequency is determined, perform a convolution operation on the amplitude-frequency response of the ideal high-pass filter and the frequency domain image, retain the components higher than this cut-off frequency and suppress low-frequency interference, and then register the processed frequency domain data in the high-frequency information mapping table. Record the coordinates and amplitude values corresponding to each frequency component in this mapping table, and finally generate the enhanced high-frequency information.

[0020] Based on the enhanced high-frequency information, when performing inverse Fourier transform on the original image, first match the corresponding relationship between the frequency domain coordinates and the spatial domain coordinates, analyze the phase information of each frequency component one by one and superimpose it with the low-frequency part of the original image. To ensure the dimensional integrity of the spatial domain, check the pixel coordinates at the left and right edges and the upper and lower boundaries of the image respectively. If it is found that the mapped coordinates exceed the maximum index value of the image width or height (for example, the maximum width index is W-1 and the maximum height index is H-1), then the pixel components outside the range are directly discarded without additional interpolation. If it is at the edge but within W-1 or H-1, it is normally retained. After all frequency components are inverse-transformed, calculate the grayscale value of each pixel point according to the pre-recorded high-frequency enhancement coefficient and merge it into the spatial domain image. Finally, keep the row and column order consistent with the original image to obtain the complete reconstruction result of the entire image and generate the high-frequency processed image.

[0021] The steps to obtain the detail-enhanced image are as follows: Receive the high-frequency processed image, calculate the second derivative of the image using the Laplacian operator, and superimpose the pixel gradient values to obtain the image after Laplacian transform; Based on the image after Laplacian transform, perform low-frequency region smoothing processing, use bilateral filtering, and adjust the pixel values according to the spatial neighborhood relationship of the image to obtain the detail-enhanced image.

[0022] Specifically, receive the high-frequency processed image, calculate the second derivative of the image using the Laplacian operator, and superimpose the pixel gradient values. First, read the grayscale values of the image and assign indexes to each pixel based on the row and column coordinates. Call a set of discrete convolution kernels to perform second-order difference calculations on the surrounding neighborhoods. For example, in a 3×3 neighborhood, set the central pixel as , and its corresponding coordinates of the upper, lower, left, and right pixels are , , and , and the diagonal pixels are respectively , , and . Multiply the grayscale values of these points by the pre-defined Laplacian operator mask and sum to obtain the local second derivative result, and then perform an addition operation on this result and the gradient value of the current pixel. If the pixel gradient exceeds the threshold set according to the overall contrast of the image. For example, the threshold can be obtained by calculating the average gradient of all pixels and the standard deviation and then taking To determine, if the gradient of a certain pixel is greater than this threshold, it is marked as a high-energy point, otherwise it is marked as a normal point. If there are multiple high-energy points in the same neighborhood, it is necessary to confirm one by one whether there are abnormal pixels with too high or too low gray values and eliminate the outliers based on local statistics. For example, when the gray value of a certain point differs from the neighborhood average by more than 40, it is considered to have an error and the second derivative of this pixel is re-estimated. After the operations on all rows and columns, the calculation results are summarized and the Laplacian value of each pixel is stored, obtaining the image after Laplace transform.

[0023] Based on the image after Laplace transform, low-frequency region smoothing processing is performed. Bilateral filtering is used to adjust the pixel values according to the spatial neighborhood relationship of the image. First, confirm the pixel range to be smoothed and judge the distance and gray value difference of the neighbors of each pixel within a certain window. For example, setting the spatial distance threshold to 3 means taking neighbors within the range of 3×3 or 5×5 and calculating according to the gray value difference threshold. For example, setting the gray value difference threshold to 30 can be determined by consulting the pixel distributions of a large number of similar images and obtaining a set of feasible intervals and then selecting the average value. If the gray value difference between a certain pixel and its neighbor is less than 30, it is included in the reference list and the Gaussian weight between it and the central pixel is calculated. The neighbor gray values are weighted and superimposed according to the Gaussian weight and the sum of all weights is recorded in the denominator of the cumulative sum. The weighted sum divided by the total weight is taken as the smoothed pixel value. If the gray value difference exceeds 30 or the distance exceeds the 3×3 window, it is not included in the weighted calculation. Finally, each pixel of the entire image is traversed to complete the smoothing operation, and then check again whether there are abnormal regions. For example, when the number of pixels in the nucleus is less than four or the local gray distribution exceeds the pre-set extended value range, further manual verification is required. If all parameters are within the set standards, the smoothed value of each position is calculated, obtaining the detail-enhanced image.

[0024] The steps for obtaining texture feature data are as follows: Based on the detail-enhanced image, divide the pixel grid of the undamaged area and extract the gray values of the pixel points in each grid. By calculating the change in the gradient direction of adjacent pixel points within the grid, construct a pixel gradient direction matrix. At the same time, obtain the curvature change information of each grid. Combining the gradient direction matrix and the curvature information, screen the pixel regions with continuous features to generate the texture data of the undamaged area; According to the texture data of the undamaged area, calculate the texture structure composite factor. The calculation formula is: ; Among them, represents the texture structure composite factor, and are the gradient values of the pixel point in the horizontal and vertical directions respectively, represents the curvature change amount of the pixel point within the local area, represents the spatial correlation factor between all pixel points within the pixel region, and are the boundaries of the gradient integration, represents the number of pixel points included in the curvature calculation, represents the number of groups of pixel points included in the spatial correlation calculation; Based on the texture structure composite factor, screen the area with the most significant change in texture features to generate texture feature data.

[0025] Specifically, based on the detail-enhanced image, divide the pixel grid of the undamaged area and read the row and column ranges of each grid. Record the gray values of all pixel points in each grid one by one. After statistically analyzing these gray values, confirm whether they are within the normal range according to the effective gray range from 0 to 255. If it is found that the gray value exceeds the high-brightness threshold 210 obtained by measuring multiple images in advance or is lower than the dark part threshold 20 obtained by comprehensively analyzing previous measurements, mark the corresponding pixel point as an abnormal point. Subsequently, calculate the local gradient direction based on the gray difference between adjacent pixel points. Perform a tangent operation on the horizontal change amount and the vertical change amount of each pair of adjacent pixels to obtain the direction angle value between pixels and organize it into the direction list of adjacent pixel pairs. If the difference between this direction angle value and the direction angle value of the previous or next pair of adjacent pixels is greater than 15 degrees, include this pixel pair in the direction turning set, otherwise mark it as part of the direction continuous set. At the same time, further measure the curvature information of pixels in the local neighborhood for each grid. The specific method is to collect pixel intensities within a range of 3×3 or 5×5 and calculate the second derivative of this range. Judge the magnitude of the curvature change by comparing with the neighborhood average value and adjacent pixels. If the curvature exceeds the critical value 50 set after multiple experiments based on experience, include this position in the curvature mutation area, otherwise mark it as a curvature smooth area. Cross-compare the calculated direction turning set with the curvature mutation area, and screen out the pixel area with continuous direction and small curvature as the overall continuous texture segment. Record the row and column coordinates and gray distribution data corresponding to these texture segments and perform unified labeling. Thus, collect the texture information of the undamaged area in all grids to obtain the texture data of the undamaged area.

[0026] The advantage of the formula is that it introduces the superposition relationship between the product of local gradient absolute values and the total curvature, and combines the product term of the spatial correlation factor for denominator adjustment, so as to classify and distinguish the phenomena of high gradient and large curvature, reduce the distortion caused by simple averaging or simple multiplication, and can comprehensively measure the direction change and spatial correlation distribution of the pixel area in actual texture detection.

[0027] The steps to obtain the parameter are as follows: calculate the gray - level difference between each pixel and its adjacent pixels in the same column in the horizontal direction, and determine the positive or negative increment in the horizontal direction according to the row - column index relationship between the pixel center position and the surrounding pixels. After quantifying all pixel differences once and dividing by the horizontal distance between pixels, the gradient value of the pixel in the horizontal direction can be obtained. , which can be obtained from the image resolution and the pixel arrangement pitch. For example, if each pixel pitch is defined as 1 pixel width, then the gray - level difference can be directly used as the calculation benchmark. In an image with a resolution of 1024×768 and a pixel pitch of 1, if a certain pixel has a gray - level of 180 and the adjacent pixel has a gray - level of 200, then the gray - level difference in the horizontal direction is 200 minus 180, which equals 20, and the corresponding .

[0028] The steps to obtain the parameter are as follows: obtain the gradient value by calculating the gray - level difference between each pixel and its upper and lower adjacent pixels in the vertical direction. The specific method is similar, except that it reads the row numbers of adjacent pixels along the column direction and performs a difference calculation according to a pixel arrangement pitch of 1. For example, if the gray - level of the central pixel in a certain row is 160 and the gray - level of the upper pixel is 140, then .

[0029] The steps to obtain the parameter are as follows: record the gray - level values of at least a 3×3 or 5×5 range for each pixel in the local neighborhood, and use the second - order difference method to calculate the curvature between pixels. If the curvature in this neighborhood shows a large positive or negative value, it is recorded as a curvature peak point. After summing all the peak values, we get a part. If the curvature is less than the critical value of 20 measured from multiple similar images, it is classified as a smooth segment; otherwise, it is classified as a curvature mutation segment. After taking the absolute value of all the values in the curvature mutation segments and performing weighted accumulation, and in order to more accurately reflect the magnitude of the curvature change, the curvature value is also recalibrated according to the intensity distribution of the neighboring pixels recorded previously. It can be accumulated using the method of characterizing the second - derivative of the curvature at each pixel position, and then the result is normalized. The normalization formula is set as , where represents the second - derivative output at pixel . In an image with an actual resolution of 512×512, if the second - derivative value measured at the center point in a 3×3 neighborhood of a certain area is 12, then .

[0030] The steps to obtain the parameter are as follows: statistically analyze the spatial correlation degree between all pixels in the local pixel area, which can be obtained by performing weighted processing on the pixel gray - level similarity and the distance factor. The weighted formula used can be set as , where and It needs to be determined according to the overall characteristics of the image. dist represents the distance between pixels, and grayDiff represents the pixel gray difference. In a certain actual image, the distances between each pair of pixels can be summarized first. For example, when the distance is within 3 pixels, dist is recorded as 1, and when the gray difference does not exceed 10, grayDiff is recorded as 1. After substituting these values into the weighted formula and summing, the part in each region can be obtained.

[0031] The steps for obtaining the parameters are as follows. When actually calculating , it is necessary to specify the pixels or coordinate ranges corresponding to the integration boundaries. Here, the and can be determined by the start and end indices of the gradient scan. For example, mapping the row and column traversal intervals to the coordinate space. In an image with a width of 1024, the column indices are divided into 0 to 1023. If it is necessary to calculate the gradient information in the range from column 100 to column 300, then can be set, . In an example, a = 20 and b = 40 can be set, corresponding to the gradient information of columns 21 to 40. After summing the for each column and approximating the integral value by the rectangle method, can be obtained.

[0032] The steps for obtaining the parameters are as follows. represents the number of pixel points included in the curvature calculation. represents the number of groups of pixel points included in the spatial correlation calculation, which needs to be determined according to the grid division and pixel grouping of the undamaged area. For example, in an image, 200 grids are divided, and each grid contains several pixel points. If 50 of these grids meet the requirements of the curvature calculation, then the sum of all pixel points in these grids can be used as the total number of pixel points for curvature calculation as . Similarly, when grouping the spatial correlation statistics, a number of groups of pixel points will also be obtained, and the total number is .

[0033] Calculation process: First, calculate , multiply the gradient values in the horizontal and vertical directions point by point and take the absolute value, and perform a discrete sum on all pixels in the range from to . In a typical example, let , . For some pixel points in this interval, the If the cumulative result of the value is recorded as 1000, then the whole item is 1000; then calculate , accumulate all curvatures, take the absolute value, and make appropriate coefficient adjustments. If the resulting value is 300, then , add the previous item to 5196.15 to get 5227.77; at the same time, take the cube root of . If the product value is 1500, then its cube root is approximately 11.44. Finally: .

[0034] This result indicates that within the specified area of the image, the texture structure composite factor is 457.38. The larger this value, the more significant the gradient and curvature changes in the local area, and the relatively higher the spatial correlation degree. When comparing this value with the threshold for screening the area with the most significant texture feature changes in the follow-up, if it exceeds the specified threshold, this part of the area can be marked as a candidate texture feature area.

[0035] Based on the texture structure composite factor, screen the areas with the most significant texture feature changes and summarize the corresponding coordinates. When matching these coordinates with the indices of the undamaged areas, it is necessary to scan the texture structure composite factor values pixel by pixel. First, the parameter distribution data is mapped to the image grid. Each grid contains several pixels and all have corresponding values. Calculate the upper and lower limits of the interval by statistically calculating the maximum and minimum values of each grid. Set a threshold range based on the actual local image distribution. For example, after analyzing multiple similar images, take values greater than 300 to 800 as the obvious texture mutation area, greater than 800 as the extremely high texture area, and less than 300 as the stable distribution area. Compare the actual data of each grid in turn and record the corresponding row and column indices. If the value of a certain grid exceeds 800, then set this grid as the extremely textured area. If it is between 300 and 800, it is considered to have relatively significant texture features. If it is less than 300, it belongs to the stable distribution. Subsequently, locate these marked grids on the image row and column coordinates and merge adjacent grids. If multiple adjacent grids are all in the significant texture feature interval, they are merged into a larger area. Continue to scan the concentration degree of the values within each merged large area. If the concentration degree is high and the overall data distribution is greater than the set reference value of 500, then keep its attribute in the significant change area. Otherwise, list it as the general change area. Finally, obtain the index information of all areas with the most significant texture feature changes. After re-checking these areas and ensuring that the indices of the left and right and top and bottom edges of the image are all within the normal range, save them as texture feature data that can be used later. The concentration degree of the values. If the concentration degree is high and the overall data distribution is greater than the set reference value of 500, then keep its attribute in the significant change area. Otherwise, list it as the general change area. Finally, obtain the index information of all areas with the most significant texture feature changes. After re-checking these areas and ensuring that the indices of the left and right and top and bottom edges of the image are all within the normal range, save them as texture feature data that can be used later.

[0036] The steps for obtaining the texture recovery image are as follows: Based on the texture feature data, determine the pixel grid of the damaged area, and analyze the pixel distribution of adjacent undamaged areas to form preliminary texture mapping data; According to the preliminary texture mapping data, calculate the optimal matching factor of the pixel points in the damaged area. The expression is: ; Wherein, represents the optimal matching factor, and respectively represent the gray values of the damaged area and the undamaged area at the pixel point , represents the Euclidean distance between the th pixel point in the damaged area and the nearest undamaged pixel point, and are the pixel ranges for integral calculation, is the total number of pixel points to be matched in the damaged area; Based on the optimal matching factor, perform pixel filling of the damaged area to generate a texture recovery image.

[0037] Specifically, based on the texture feature data, determine the pixel grid of the damaged area and read the corresponding row and column ranges. First, identify each grid to confirm whether there are significantly missing pixel points. Read the texture feature data of the undamaged area obtained in the previous steps to judge the gray continuity between adjacent grids. Identify the local difference by comparing the average gray value of the pixels in the grid with the average gray value of the adjacent undamaged area. If the difference is greater than the upper limit between 10 and 30 in the threshold range obtained by detecting multiple images of the same type, mark the grid as a severely damaged grid. If the difference is within the range of 10 to 30, mark it as a moderately damaged grid. If it is less than 10, it is considered that the difference between this grid and the adjacent undamaged area is small. Subsequently, traverse the local gradient distribution and gray distribution of each pixel in the severely damaged grids and moderately damaged grids and record the gray difference between each pixel and the adjacent undamaged pixel. Respectively, count the comparison relationship between the gray value in the range of 0 to 255 and the threshold. For example, verify the external temperature information in the temperature range of 0°C to 90°C and verify the intensity of the analog signal in the system in the voltage range of 0V to 24V. Only perform the next step on the pixel data that meets these valid ranges. If it is found that some pixels are abnormal (such as the gray value is below 0 or above 255), correct them through the local interpolation method. After that, confirm the spatial distribution positions of the undamaged pixels and damaged pixels in each grid. Take the row and column distance less than or equal to 5 as the adjacent area distance standard. In the severely damaged grids, count the position distribution of all adjacent undamaged pixels and register their indexes. Then summarize this information to obtain the mapping relationship between multiple adjacent undamaged areas and damaged areas. Finally, connect the pixel gray values of the undamaged area with the positioning mapping of each pixel point in the damaged area according to the position correspondence relationship to form a set of preliminary texture mapping data. If there is a small range of out-of-bounds (rows and columns exceeding the width and height of the image) in the grid of the damaged area, automatically reduce the grid range without exceeding the maximum index W - 1 or H - 1 of the image boundary and re-count the number of pixels in the grid to obtain the preliminary texture mapping data.

[0038] The advantage of the formula is that it introduces the gray differential accumulation amount between the damaged area and the undamaged area, as well as the sum of the squares of the Euclidean distances from the damaged pixels to the nearest undamaged pixels. By measuring the matching degree through the ratio of the numerator to the denominator and adding the fourth root to the final result, it can make a relatively balanced adjustment for extremely large or small differences, reducing the imbalance problems that may be brought by simple subtraction or simple weighting. In texture mapping, it can comprehensively consider the comprehensive gap between the gray deviation and the spatial position.

[0039] The steps for obtaining the parameters are: representing at the pixel point To find the grayscale value of the damaged area, you need to traverse all the row and column coordinates of the area and query the grayscale information of the corresponding pixel, and then record it in the grayscale set. The grayscale of each pixel is generally between 0 and 255. If the grayscale exceeds 255 or is lower than 0, it is necessary to correct it in combination with the processing method of the abnormal value in the previous step. Here, you can directly count according to the actual observed values. For example, if the grayscale value of several pixels is extracted in the deep damaged area, if the grayscale value of a pixel is 180, then If the gray value of a pixel is 90, .

[0040] The steps to obtain the parameters are: In order to match the grayscale value of the undamaged pixel in the corresponding position in space, it is necessary to read the pixel value of the nearest row and column index to the damaged pixel in the adjacent undamaged area determined previously, and then record its grayscale. If the grayscale value of an undamaged pixel is 200, the value is marked as .

[0041] The steps for obtaining the parameters are: The Euclidean distance between a pixel and the nearest undamaged pixel. In order to quantify this distance, it is necessary to calculate the spatial distance value based on the row and column coordinate difference. If a pixel has a row coordinate of , the nearest undamaged pixel has row coordinates ,but After all pixels have found the nearest undamaged pixel, count all And find their squares respectively Do the accumulation. If there is a damaged pixel at (100, 50) and the adjacent undamaged pixel is at (101, 52), then calculate .

[0042] and The steps to obtain the parameters are as follows: the pixel range for integral calculation should be marked on both the ordinate and the abscissa. To perform discrete integration, the starting and ending indices of discrete pixels must be clearly defined and used as and 's coordinate markings, if c=10, d=40.

[0043] The steps to obtain the parameters are as follows: the total number of pixels to be matched in the damaged area. It is necessary to count the pixels in the damaged area and record the number of pixels. The local row and column coordinates can be traversed and counted. Each time a valid pixel is found, 1 is added. If a damaged area contains 150 pixels, it is recorded. 。

[0044] Calculation process: After preparing distribution, the sum of squares, and the upper and lower limits of the integral and then, first perform a discrete summation of the gray - level differences of all pixels: ; If the accumulated result is 1200 in the range where u ranges from 10 to 40, then this integral result can be recorded as 1200; then perform an operation on If p = 150 and the sum of each squared distance is 3000 after accumulation, then the denominator part is 3000, and finally calculate the ratio of the numerator to the denominator: 。

[0045] Then take the fourth root of this result: This result indicates that the matching degree value between the current damaged area and the corresponding undamaged area is 0.84. When this value is closer to 1, it represents that the gray - level difference is relatively small and the sum of squared spatial distances is not large. A value between 0.5 and 1.0 is generally regarded as an acceptable matching degree. If it is greater than 0.9, it indicates a high matching degree. If it is less than 0.5, it indicates a large gray - level difference or distance, and it is necessary to re - select an adjacent undamaged area for filling and comparison.

[0046] When filling the pixels of the damaged area based on the best - matching factor, it is necessary to screen the appropriate gray - level value for each pixel point according to the matching result obtained previously. First, arrange all the pixels in the damaged area in row - column order and index them according to the grid division, query the gray - level distribution of the corresponding undamaged area in the previous steps, and find the best - matching factor Higher (e.g., higher than 0.7) pixel pairs are paired and the spatial distance from the original damaged area is counted. If the squared distance is too large, sub-optimal matching is performed for comparison. The grayscale values of the best or sub-optimal pairs are read and recorded in the damaged area filling list. Then, according to the principle of local consistency, the grayscale values of adjacent pixels are smoothly connected within the grid. If most of the pixel matching factors in a certain grid are close to 1, it indicates that the difference from the undamaged texture is small, and the corresponding undamaged grayscale is directly used to replace the damaged pixels. If the matching factor is between 0.5 and 0.7, it means that the grayscale difference is slightly larger. It is possible to search for a better pair in the spatial neighborhood or perform interpolation to supplement the pixel. For example, in a 5×5 neighborhood, the matching factor and grayscale value distribution are counted, and a pixel with a closer distance and smaller grayscale difference is found for replacement. After each pixel's grayscale replacement is completed, the result is overwritten back to the original image row by row, and during the overwriting process, it is checked whether there are pixels with sudden grayscale changes after overwriting. If the grayscale difference exceeds the threshold of 40 set according to prior statistics, the neighborhood query is performed again. If a pixel with a higher new matching factor is found in the neighborhood, the grayscale of this pixel is used to refill. Finally, after all damaged pixels are traversed, all filling results are summarized to ensure that the indices from the upper left corner to the lower right corner of the image are within the normal range of 0 to W-1 or H-1, and a texture recovery image is obtained.

[0047] The steps for obtaining the original spectral data are as follows: Use a spectral imager to scan the texture recovery image, capture the color information of each area in the image, and measure the light reflectance at different spectral wavelengths for each pixel point to obtain the pixel point spectral reflectance data; Based on the pixel point spectral reflectance data, chromatic aberration and offset are corrected, and at the same time, noise and outliers are removed by filtering to obtain the original spectral data.

[0048] Specifically, a spectral imager is used to scan the texture restoration image. The spectral imager is first configured for the band range and ensured to cover the visible light and near-infrared regions. For example, several fixed sampling points are set between the wavelength of 380nm and 780nm and the light intensity at these sampling points is recorded. The corresponding light intensity needs to be compared with the reflectivity range of 0 to 100% to determine whether it is in the usable range. If it is found that the reflectivity of some pixels at a specific wavelength exceeds 1.0 or is lower than 0, it is necessary to combine the calibration board that comes with the instrument to complete the comparison again. For example, during the calibration process, a white board with a reflectivity of approximately 0.99 and a dark board with a reflectivity of approximately 0.01 are selected for calibration. The output power of the light source is compared and the reflectivity values ​​obtained in the same wavelength range are recorded. If the collected pixel reflectivity is greater than 1.0, the reference value measured by the calibration board is used for normalization correction and Register the adjustment amplitude. If the reflectivity is less than 0, locate it as a data anomaly and interpolate a reasonable transition value in the adjacent band. Then, ensure that all row and column coordinates on the image can be scanned by traversing row by row. If some coordinates are unstable due to uneven edges or local defects, additional compensation is made according to the collected external environment brightness and the compensation information is registered in the reflectivity distribution of adjacent pixels. After completing all row and column scans, summarize the multi-band reflectivity sequence in the data structure, bind the sequence to the corresponding pixel coordinates and confirm the effective data volume of each band. If it is found that there are too few sampling points or the loss exceeds the allowable threshold of 5% set according to the statistics of previous scans, it is necessary to rescan. Finally, when all spectral bands are collected and the reflectivity of each pixel is guaranteed to be distributed between 0 and 1.0, the scanning process is stopped to obtain the pixel point spectral reflectivity data.

[0049] Based on the spectral reflectance data of pixel points, when correcting color difference and offset, first read the spectral values of all bands pixel by pixel and compare them with the reference values of the standard color card. The reference values of this color card are usually distributed between 0 and 1, and the nominal reflectance collected in advance is recorded for each band. Subtract the reflectance of the corresponding color card from the spectral data of the pixel points to calculate the local difference. If the difference exceeds the critical value of 0.05 established after multiple comparisons, register this pixel as a region with a large color difference and perform interpolation smoothing between adjacent pixels to reduce outliers. Determine the correction amplitude by obtaining the average difference of the surrounding bands at this coordinate and weighing its difference from the central pixel. Subsequently, mark the pixels with an offset greater than the predetermined standard of 0.1 as high-offset points and check the power and positioning accuracy of the acquisition light source. If the acquisition power deviates from the reference value given according to the factory configuration of the instrument by 10% to 15% range, automatically trigger a light source correction program to restore the stability of the light source output. When performing denoising judgment on the marked high-offset pixels, waveform spikes can be removed by the 5-point moving average method or other local statistical methods. If there are abnormal peaks higher than twice the reference mean in some bands, they are regarded as noise peaks and replaced with the average value of the adjacent two bands. After completing the above denoising and offset correction, rearrange the spectral distribution of all pixels and map it back to the original row and column coordinates, merge row by row to obtain a new spectral sequence, and check whether there is missing data or discontinuous interpolated values. If all pixels meet the reasonable range of 0 to 1 and the difference from the reference color card does not exceed 0.05, end this correction process to obtain the original spectral data.

[0050] The steps for obtaining the spectral adjustment image are as follows: Based on the original spectral data, calculate the change trend of the spectral reflectance at each wavelength, screen the spectral bands most significantly affected by aging, and obtain the simulated aging spectral data; According to the simulated aging spectral data, calculate the restored color value, and the calculation formula is: ; Among them, represents the restored color value, is the color value before aging, is the spectral reflectance of the current pixel point, is the spectral reflectance corresponding to the aging state, is the time factor, indicating the time experienced by the material aging, is the aging response coefficient, indicating the sensitivity of the material to environmental changes, is the light intensity, is the environmental humidity, is the oxidation influence factor; Based on the restored color value, perform a global adjustment on the color space of the entire image, apply the restoration pixel by pixel, adjust the color offset, and generate the spectral adjustment image.

[0051] Specifically, based on the original spectral data, after reading the registered multi-band reflectance distribution, traverse these reflectance values wavelength by wavelength and analyze them according to the mutual differences between adjacent bands. Record the increasing and decreasing trends between each band and compare them with the aging reference curve obtained from multiple sample statistics before. If the difference between the reflectance and the reference curve in some bands within the range of 380 nm to 780 nm is greater than the threshold of 0.08 obtained by synthesizing multiple measurement experiences, mark them as significantly aging bands. If the difference is within 0.08, consider them as slightly aging bands. Subsequently, record these significantly aging bands in sequence according to the material aging rate, that is, after obtaining the control data of multiple samples of the same type of material aging for 120 days and 240 days on average at room temperature, statistically analyze the attenuation intervals of the reflectance of these control samples in each band. Compare the reflectance of each band in the current image with the attenuation interval. If the attenuation degree is close to the upper limit of this interval, consider it as the band most affected by aging, and continue to check whether a similar attenuation trend also appears within the range of 5 nm above and below this band. If it appears, merge the surrounding bands into the same aging-affected interval. If not, separately retain the aging record of this band. Then, arrange these screened bands in descending order to obtain a sorted list, and map it back to the image row and column coordinates to locate to the pixel level to check which pixel points actually show obvious attenuation in these aging bands. If it is found that the reflectance of some pixels shows continuous attenuation in both the short wavelength band and the long wavelength band, supplement the comparison according to the collected light intensity and humidity data to confirm whether it coincides with the area with the fastest aging in the previous multiple control images. Finally, integrate the recorded significantly aging bands into a wavelength sequence, recombine the reflectance attenuation information in this sequence according to the wavelength order and interpolate and complete it to form the simulated aging spectral data for subsequent color restoration.

[0052] The benefit of the formula is that it introduces the ratio of reflectance before and after aging for the spectral changes caused by material aging and combines the time factor as well as the difference components of light intensity and humidity , to form a comprehensive adjustment factor for color restoration, which not only considers the amplitude of spectral changes but also takes into account the color deviation brought by the aging environment, thereby improving the accuracy of the restoration result.

[0053] The steps to obtain the parameter are as follows: The color value before material aging, which needs to be obtained from the original or unaged image data recorded before. In actual implementation, it can be obtained from the reference color of the same material scanned before but in the unaged area. For example, if the converted RGB value of a certain pixel is approximately (180, 160, 120), then it can be (180, 160, 120) for subsequent formula operations.

[0054] The steps for obtaining the parameter are as follows: It represents the spectral reflectance value corresponding to the current pixel after aging, which needs to be obtained by searching and interpolating the simulated aging spectral data for the band where the pixel is located. If the simulated aging spectral sequence is set with a 10-nm step between 380 nm and 780 nm, the reflectance of each band can be gradually obtained to get a series of values for the pixel, and the multi-band results can be merged when needed. For example, the spectral reflectance after aging of a certain pixel at the 560-nm band is measured to be 0.65, and at the 570-nm band is 0.64, etc.

[0055] The steps for obtaining the parameter are as follows: It represents the spectral reflectance corresponding to the aging state, and is paired with to reflect the comparison between before aging (or the reference aging degree) and after aging in the same band. It can be obtained from the reference material database or the initial aging values recorded multiple times before. If the database contains the reflectance of the material in each band at known aging days, for example, the reflectance of a certain material at 560 nm after aging for 30 days is 0.72, the aging difference of the current pixel can be judged after comparison and form in the formula. When actually processing, it is necessary to first locate the corresponding material and its aging duration, and then match the same band to obtain .

[0056] The steps for obtaining the parameter are as follows: It represents the time experienced by the material during aging, and the duration data obtained from the environmental aging measurement of the material needs to be read. If a unified aging cycle such as 180 days is used in the actual record, then can be set.

[0057] The steps for obtaining the parameter are as follows: It represents the aging response coefficient, which needs to be set by combining the material formula and its sensitivity to the surrounding environment. For example, when evaluating a certain type of paper material, a response coefficient in the range of about 10 to 30 will be obtained. The smaller the value, the more sensitive the material is to environmental changes, and the larger the value, the more stable it is. When obtaining it, generally, the aging speed of several batches of the same material under constant temperature and humidity will be continuously monitored, and then the aging speed and time are linearly or non-linearly fitted to obtain an aging curve. The slope or fitting parameter of this curve can be used as the main basis for , and can also be refined to a specific value after multiple iterations. For example, in an experiment, the yellowing degree and spectral attenuation of the material within 12 weeks are recorded to obtain .

[0058] The steps for obtaining the parameter are as follows: representing the light intensity, it is necessary to first install an optical photometric device in the environment and obtain the intensity value at regular intervals. After counting for a whole day or several days, calculate the average value of the results. It is also possible to use the peak or weighted method for processing to obtain a relatively stable representative value of the light intensity. Register this value within the range of 0 to 200,000 lux. If the average illuminance of the environment is 1,500 lux, then 。

[0059] The steps for obtaining the parameter are as follows: representing the environmental humidity, it is necessary to install a humidity sensor at the location where the material is located and continuously collect data on the relative humidity from 0% to 100%. Calculate a stable representative value or range of humidity through daily or weekly monitoring values. For example, under the condition of an indoor average relative humidity of 50%, record 。

[0060] The steps for obtaining the parameter are as follows: representing the oxidation influence factor, it is necessary to determine by measuring the color change of the material under different oxygen concentrations or oxygen-containing environments multiple times. During the operation, gradually adjust the oxygen concentration under fixed temperature and relative humidity and observe the spectral attenuation change, and then summarize to obtain the sensitivity of the material to the oxidation environment. Once confirmed, can be placed in the numerical range of 10 to 30 to measure the additional color deviation caused by its susceptibility to oxidation. For example, if a significant increase in the fading rate of the material is detected in an environment with a high oxygen concentration and high temperature, and through data fitting, 。

[0061] Calculation process: The first step is to calculate , extract the reflectance after aging of this pixel from the database and the corresponding initial reflectance after aging , time factor days, aging response coefficient , then: ; ; The second step is to calculate , if the light intensity , environmental humidity , oxidation influence factor , then: ; ; ; The third step is to multiply the above result by the color value before aging If the RGB value of this pixel If the red component is 180, then the repaired red component is: . Since color components are usually restricted between 0 and 255, generally, normalization or mapping processing is performed on the result. 4651.2 can be mapped back to the standard 0 - 255 range. If a linear compression method is used, 4651.2 can be mapped to approximately 255, indicating that this component reaches the channel upper limit after repair. It is necessary to allocate and adjust in combination with the actual image environment or other color management processes. For the complete RGB calculation, the same operations can be performed on the green and blue components and finally combined into the repaired color value.

[0062] This result shows that when is small and is large, it will make the value of the color gain term very high, and it is necessary to compress it to an acceptable range by means of subsequent color space adjustment. If is close to 1 and the value is not large, then the final repaired value is relatively close to , and the comprehensive consideration of the spectral reflectance difference and environmental impact can be completed simultaneously among different pixels, providing a multi-dimensional basis for global color adjustment.

[0063] When performing global adjustment on the color space of the entire image based on the repaired color value, after the per-pixel operation is completed, it is necessary to record the repaired values of all pixels first and count the maximum and minimum color components. If the difference exceeds the threshold of 50 set by previous experience determination, it means that some pixels are significantly higher than the general level in the red or green components, and secondary normalization needs to be performed uniformly in subsequent operations. First, subtract the current global minimum value from the color value components of all pixels and then divide by the current component range to achieve normalization from 0 to 1. Subsequently, multiply this 0 - 1 range by the target color space upper limit of 255 to obtain the new RGB matrix of the entire image. If some pixels still show abnormalities during this normalization process (such as exceeding 255 after mapping), then use the median of adjacent pixels as a substitute value to ensure the continuity of the row and column distribution of the entire image. After this global adjustment, traverse and confirm again whether there is a situation where a single channel is too saturated in the image. For example, if the intensity of a single channel is close to 255 and the difference from adjacent pixels exceeds the set standard of 60, it is considered that there is an obvious color mutation, and interpolation can be performed on the mean value of the 9×9 or 11×11 area around this pixel to achieve smooth transition. Finally, after ensuring that the row and column order from the upper left corner to the lower right corner of the image is checked and meets the set unified color range, the spectral adjustment image is obtained.

[0064] The steps to obtain the repaired image are as follows: Obtain the spectral adjustment image, divide the image into multiple regions of a fixed size, extract pixel gradient, contrast, and color distribution features for each region, and generate the basic data of image quality; Based on the basic image quality data, calculate the comprehensive quality score of the image. The calculation formula is: ; Among them, represents the comprehensive quality score of the image, is the gradient magnitude of the th pixel point, is the local color uniformity of the th region, and are the average values of the blue channel and the red channel of the whole image respectively, is the total number of pixel points, is the number of image segmentation regions; Based on the comprehensive quality score, judge the image enhancement effect to obtain the restored image.

[0065] Specifically, after obtaining the spectral adjustment image, divide the whole image into multiple regions of a fixed size according to the row and column coordinates. A row and column span can be set for each region as an index basis, and independent pixel matrices can be distinguished one by one. Then, traverse all the pixels in each region and record the corresponding pixel gray gradient information, the brightness contrast between pixels, and the color distribution characteristics contained in this region. When reading the pixel gradient, the gray difference method in the vertical and horizontal directions can be used and the difference is compared with the set threshold. For example, the gradient threshold is set to 15, which is within the feasible range after multiple previous statistics. By performing operations on the gradient standard deviation and the average value of all the pixels in the image and selecting Obtain this threshold value so that pixels exceeding this value are marked as high-gradient points, otherwise registered as low-gradient points. Then, calculate the local contrast based on the pixel brightness distribution within the same region. If the brightness difference of more than 70% of the pixels in a 10×10 region exceeds the threshold value of 40 obtained from empirical statistics, it indicates that the region has a large contrast, and thus mark this region as having a large contrast in the table. The color distribution characteristics are confirmed by summarizing the intensity values of the three channels of each pixel to determine the proportion of blue, green, or red within the region. Calculate the average intensity of each channel and use the numerical comparison within the range of 0 to 255 to judge the proportion of the main color. If the average intensity of the blue channel in a certain region reaches more than 180 and is 30 higher than other channels, it is determined that this region is mainly blue. If the difference between channels in a certain region is less than 10, it is classified as a region with uniform color distribution. Scan one by one until all divided regions are covered, and then register the obtained information such as gradient, contrast, and color distribution. For example, count the number of gradient points, contrast levels, and main color values in each region and combine them into a basic image quality data. Then, check for any missing or abnormal regions. If there is a situation where the row or column exceeds the boundary, such as exceeding the maximum index value of the image width or height, it is supplemented by re-dividing the region within the visible range. After all regions have generated relevant statistical data, the basic image quality data can be determined.

[0066] The advantage of the formula lies in combining the sum of the gradient amplitudes of all pixel points and the product of the color uniformity of each segmented region, and using the difference between the average values of the blue and red channels as the denominator, enabling the edge information, local color uniformity, and channel distribution of the image to jointly participate in the quality measurement, which can reflect a more three-dimensional comprehensive evaluation standard.

[0067] The steps to obtain the parameter are as follows: representing the gradient amplitude of the th pixel point, it is necessary to calculate the square root of the sum of the squares of the brightness differences in the horizontal and vertical directions of this pixel. For example, when the gray difference in the x direction is 10 and the gray difference in the y direction is 20, its gradient amplitude is . Usually, similar operations are performed on all pixels to obtain a whole column of gradient data, and then these data are subjected to necessary checks to remove extreme outliers. A fixed threshold can be used for judgment during comprehensive statistics. For example, in the form of to screen out abnormal points. Each pixel finally retains a and accumulates them one by one into . If the image has vm pixels, vm gradient amplitude records will be generated. After summarizing them in order, they can be substituted into the formula.

[0068] The steps to obtain the parameter are as follows: representing the The local color uniformity of an area requires quantifying the uniformity by statistically analyzing the color distribution of all pixels within the area after dividing the image into several regions of a fixed size. The variance or range of each channel is evaluated in the RGB or Lab color space, and the dispersion degrees of multiple channels are combined into a single value. The specific combination method can use to measure the dispersion of the color distribution. When obtaining it, the same operation needs to be performed on each partition and the results are stored in for to smoothly perform cumulative multiplication and cube root operations during actual calculations. For example, in actual measurements, for a 10×10 pixel block, , , are combined. If is taken.

[0069] The steps to obtain the parameter are as follows: represents the total number of pixel points, which can be obtained by multiplying the number of rows and columns of the image. For example, if the image resolution is 512×512, then

[0070] The steps to obtain the parameter are as follows: represents the number of image segmentation regions, which needs to be determined according to the previously planned fixed size. For example, if each region is set to 32×32 pixels, then for a 512×512 image, it can be divided into 16 regions horizontally and vertically, with a total of sub-regions, so

[0071] The steps to obtain the parameter are as follows: represents the difference between the average values of the blue and red channels of the entire image. First, traverse the image row by row to record the blue components of all pixels and calculate the arithmetic average to obtain the value of B. Do the same for the red components to obtain the value of R. Finally, calculate the difference between the two and take the absolute value. For example, in a 512×512 image, after sampling, the average value of the blue components is , and the average value of the red components is .

[0072] Calculation process: First step, calculate , for example , assuming the cumulative result is 5000000, then: ; Second step, calculate , for example vn = 256, take each region and add 1, then multiply them all. If the product result is 2.5^6, then: ; Third step, calculate If B = 110 and R = 105, then: ; Step 4: Substitute the above three parts into the formula: ; The result shows that the comprehensive quality score of the image is approximately 474.396. The larger this value, the relatively higher the superposition of the gradient and color features. If compared with a set of reference images of the same size or in the same scene in advance, the enhancement effect of the currently restored image can be judged by the difference. In this example, 474.396 can be compared with different thresholds. For example, in the historical image statistics, a reference value in the range of 300 to 400 can be set as medium quality. If QU is greater than 400, it can be regarded as a better effect. If QU is much lower than 300, the image enhancement process needs to be reconfirmed or the reasons need to be found.

[0073] The result shows that the comprehensive score obtained based on the gradient information of each pixel of the image and the regional color distribution can quantitatively judge the imaging quality in some cases, and form a comparable scoring benchmark among different images, providing data support for obtaining the restored image and completing the quality assessment subsequently.

Claims

1. An archive restoration system based on image enhancement, characterized in that: The system comprises: A high-frequency detail enhancement module receives the damaged archive image, processes the high-frequency information through a high-pass filter, and obtains a high-frequency processed image; sharpens the high-frequency processed image while maintaining the smoothness of the low-frequency region to generate a detail-enhanced image; A texture pattern mapping module, based on the detail enhanced image, analyzes the texture and pattern of the undamaged area, extracts key texture features, and obtains texture feature data; copies and extends the texture feature data to the damaged area, restores the damaged texture and pattern, and generates a texture restoration image; A spectral data reconstruction module collects material color data in the texture restoration image, performs spectral analysis, and obtains original spectral data; based on the original spectral data, simulates spectral change data during material aging, adjusts and repairs image color, restores color distortion caused by material aging or chemical changes, and generates a spectrally adjusted image; The comprehensive evaluation module obtains the spectrally adjusted image, evaluates the image quality, checks the clarity and color authenticity of the image, and obtains a restored image.

2. The image enhancement-based archive restoration system according to claim 1, characterized in that: The steps of acquiring the high-frequency processed image are: receiving a damaged archive image, reading pixel matrix information of the image, extracting grayscale values ​​of all pixels, constructing an image grayscale matrix, calculating pixel intensity distribution based on the image grayscale matrix, and extracting gradient information of each pixel, and screening the image high-frequency data according to the gradient information; Based on the high-frequency data of the image, a cutoff frequency parameter of a high-pass filter is set, a convolution operation of the high-frequency signal and the filter response function is calculated, a frequency domain conversion is performed on the image matrix, and the interference of the low-frequency component is suppressed by the high-pass filter to generate enhanced high-frequency information; Based on the enhanced high-frequency information, the original image is transformed in the inverse frequency domain, the enhanced high-frequency information is reconstructed into the image space domain, and the boundary is adjusted to match the original image size to generate a high-frequency processed image.

3. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the detail enhanced image is: receiving the high-frequency processed image, using the Laplace operator to calculate the second-order derivative of the image, and superimposing the pixel gradient values ​​to obtain the Laplace transformed image; Based on the image after Laplace transformation, low-frequency region smoothing is performed, bilateral filtering is adopted, pixel values ​​are adjusted according to the spatial neighborhood relationship of the image, and a detail-enhanced image is obtained.

4. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the texture feature data is as follows: based on the detail enhanced image, dividing the pixel grid of the undamaged area, and extracting the gray value of the pixel point in each grid, by calculating the gradient direction change of adjacent pixel points in the grid, constructing a pixel gradient direction matrix, and acquiring the curvature change information of each grid at the same time, combining the gradient direction matrix and the curvature information, screening the pixel area with continuity characteristics, and generating texture data of the undamaged area; According to the texture data of the undamaged area, the texture structure composite factor is calculated, and the calculation formula is: ; in, represents the texture structure composite factor, and are the gradient values ​​of the pixel in the horizontal and vertical directions respectively. Indicates the curvature change of the pixel in the local area. Represents the spatial correlation factor between all pixels in the pixel area, and is the boundary of the gradient integral, Represents the number of pixels included in the curvature calculation, Represents the number of pixel groups included in the spatial association calculation; Based on the texture structure composite factor, the area with the most significant texture feature changes is screened to generate texture feature data.

5. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the texture restoration image is: based on the texture feature data, determining the pixel grid of the damaged area, and analyzing the pixel distribution of the adjacent undamaged area to form preliminary texture mapping data; According to the preliminary texture mapping data, the best matching factor of the pixels in the damaged area is calculated, and the expression is: ; in, represents the best matching factor, and Represents the damaged area and the undamaged area at the pixel point The gray value at Indicates the damaged area The Euclidean distance between a pixel and the nearest undamaged pixel, and is the pixel range for integral calculation, is the total number of pixels to be matched in the damaged area; Based on the best matching factor, pixels of the damaged area are filled to generate a texture restored image.

6. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the original spectral data is: using a spectral imager to scan the texture restoration image, capturing the color information of each area in the image, measuring the light reflectance at different spectral wavelengths for each pixel point, and obtaining the spectral reflectance data of the pixel point; Based on the pixel point spectral reflectance data, chromatic aberration and offset are corrected, and noise and abnormal points are removed by filtering to obtain original spectral data.

7. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the spectrum adjustment image is: based on the original spectrum data, calculating the variation trend of the spectrum reflectance at each wavelength, screening the spectrum band most significantly affected by aging, and obtaining simulated aging spectrum data; According to the simulated aging spectrum data, the color value after restoration is calculated, and the calculation formula is: ; in, Represents the color value after repair, is the color value before aging, is the spectral reflectance of the current pixel, is the spectral reflectance corresponding to the aging state, is the time factor, which indicates the time it takes for the material to age. is the aging response coefficient, which indicates the sensitivity of the material to environmental changes. is the light intensity, is the ambient humidity, It is the factor affecting oxidation; Based on the repaired color values, the color space of the entire image is globally adjusted, and the repair is applied pixel by pixel q point to adjust the color shift and generate a spectrally adjusted image.

8. The image enhancement-based archive restoration system according to claim 1, characterized in that: The step of acquiring the restored image is: acquiring the spectrally adjusted image, dividing the image into a plurality of regions of fixed size, extracting pixel gradient, contrast and color distribution features for each region, and generating basic image quality data; Based on the basic image quality data, the comprehensive quality score of the image is calculated using the following formula: ; in, Represents the comprehensive quality score of the image. For the The gradient amplitude of each pixel, For the The local color uniformity of the region, and are the average values ​​of the blue channel and the red channel of the entire image, respectively. is the total number of pixels, is the number of image segmentation regions; Based on the comprehensive quality score, the image enhancement effect is judged to obtain a restored image.

Citation Information

Cited By

  • Rain and fog image restoration method, system, equipment and medium

    CN117078527A

  • A dual-mode fusion method, system, device, and medium for rain and fog image restoration.

    CN117078527B

  • Field-level crop image enhancement system based on multi-source remote sensing data

    CN120746920A

  • Electronic file verification method and system for digital commerce

    CN120997814A

  • Knitted label scanning image completion operation method

    CN121544502A