Image restoration method based on AIGC
By using AIGC technology to zoom and analyze images in the image processing module, the problem of distortion after image amplification is solved, and a more efficient image repair effect is achieved.
Patent Information
- Application Number
- CN202411761703.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The prior art fails to effectively solve the problem of distortion after image amplification during image repair.
By using AIGC technology in the image processing module, the original image is scaled into an adjusted image, and by calculating the quality information of the adjusted image, it is determined whether it has distortion. If the standards do not meet the standards, the adjustment image is invalid and the new adjustment image is rescaled to form a new adjustment image for subsequent image repair operations.
Effectively determine whether the image scaling process meets the standards, avoid distortion problems, and improve the effect and accuracy of image repair.
Smart Images

Figure CN119693278A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image restoration methods, and in particular to an image restoration method based on AIGC. Background Art
[0002] AIGC is a milestone for human society and artificial intelligence. In the short term, AIGC changes the basic productivity tools; in the medium term, it will change the production relations of society; in the long term, it will promote a qualitative breakthrough in the productivity of the entire society. At the same time, AIGC has raised the data element to the position of the core resource of the era, which has accelerated the digital transformation process of the entire society to a certain extent.
[0003] AIGC is the cumulative integration of multiple technologies, including GAN, CLIP, Transformer, Diffusion, pre-trained models, multimodal technology, generation algorithms, etc. The continuous innovation and iteration of these technologies have triggered a qualitative change in AIGC technology, making it more versatile and with stronger basic capabilities.
[0004] Image restoration can be used in many fields, such as digital photography, advertising design, art creation, image processing, etc. It can help people repair and optimize some damaged, blurred, and distorted images to restore them to their original state, and it can also help people create more perfect images.
[0005] After extensive searching and reference, we found that many image restoration methods have been developed. For example, the prior art image restoration method disclosed in publication number CN114199157A includes the following steps: placing the object on a contour scanner, performing an initial scan of the object using the contour scanner, and storing the scanned 3D image; using AIGC technology to repair defective parts of the scanned image. During the repair, the scanned image will be enlarged and then repaired in order to facilitate the extraction of the target repair position.
[0006] In the prior art, since the magnification factor is not set, the magnified image may be distorted. Summary of the invention
[0007] The purpose of the present invention is to improve the image restoration effect. In view of the above-mentioned shortcomings, an image restoration method based on AIGC is proposed.
[0008] The present invention adopts the following technical solution:
[0009] An image restoration method based on AIGC comprises the following steps:
[0010] S1: The image acquisition module acquires the original image and transmits it to the image processing module and the image analysis module;
[0011] S2: The image processing module scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module;
[0012] S3: The image analysis module analyzes the original image and the adjusted image based on the AIGC technology, and obtains the brightness similarity between the original image and the adjusted image obtained by the i-th detection, the contrast similarity between the original image and the adjusted image obtained by the i-th detection, the structural similarity between the original image and the adjusted image obtained by the i-th detection, the resolution of the adjusted image and the resolution of the original image, and transmits the information to the control module;
[0013] S4: The control module calculates a resolution difference according to the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections according to the resolution difference, calculates the average structural similarity of the original image and the adjusted image according to the relevant information, obtains quality information of the adjusted image according to the average structural similarity of the original image and the adjusted image, and synchronously transmits the quality information of the adjusted image to the communication module and the alarm module;
[0014] S5: The communication module transmits the quality information of the adjusted image to the user end;
[0015] S6: The alarm module implements an alarm based on the quality information of the adjusted image.
[0016] Optionally, the image processing module includes an image scaling submodule, and the image acquisition module and the image analysis module are both communicatively connected to the image scaling submodule;
[0017] The image scaling submodule scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module;
[0018] The image acquisition module acquires the original image and transmits it to the image scaling submodule.
[0019] Optionally, when the control module calculates the average structural similarity between the original image and the adjusted image, the following formula is satisfied:
[0020]
[0021] FB c =fb after -fb before ;
[0022] Where ΔSSIM(x, y) is the average structural similarity between the original image and the adjusted image, x is the original image, y is the adjusted image, I is the total number of detections, and L(x, y) i is the brightness similarity between the original image and the adjusted image obtained by the i-th detection, C(x, y)i is the contrast similarity between the original image and the adjusted image obtained by the i-th detection, S(x, y) i The structural similarity between the original image and the adjusted image obtained by the i-th detection;
[0023] FB c is the resolution difference;
[0024] fb after To adjust the image resolution, fb before is the resolution of the original image.
[0025] Optionally, when the control module calculates the quality information of the adjusted image, the following formula is satisfied:
[0026]
[0027] Among them, ZL is the quality information of the adjusted image, is the selection threshold of the average structural similarity between the original image and the adjusted image. When ZL=1, the scaling process of the adjusted image does not meet the standard and needs alarm processing. When ZL=2, the scaling process of the adjusted image meets the standard and does not need alarm processing.
[0028] Optionally, in step S2, the image processing module performs target screening on the original image and the adjusted image based on the AIGC technology and transmits them to the image analysis module;
[0029] In step S3, the image analysis module analyzes the original image and the adjusted image after target screening based on the AIGC technology, and obtains the scaling weight index, the scaling factor of the adjusted image, the brightness change weight index, the average value of the brightness of all units on the ith extended line in the original image, the average value of the brightness of all units on the ith extended line in the adjusted image, the reference index of the ith extended line, the maximum value of the brightness of the unit on the ith extended line in the original image, the minimum value of the brightness of the unit on the ith extended line in the original image, the maximum value of the brightness of the unit on the ith extended line in the adjusted image, the minimum value of the brightness of the unit on the ith extended line in the adjusted image, the total number of rows of units constituting the screening frame, and the total number of columns and rows of units constituting the screening frame, and transmits the information to the control module;
[0030] In step S4, the control module calculates the total number of preset extension lines and the total number of cells constituting the filter frame according to the total number of rows and columns of cells constituting the filter frame, calculates the target screening matching factor according to the relevant information, obtains the target screening evaluation information according to the target screening matching factor and transmits it to the communication module and the alarm module synchronously;
[0031] In step S5, the communication module transmits the target screening and evaluation information to the user end;
[0032] In step S6, the alarm module implements an alarm according to the target screening and evaluation information.
[0033] Optionally, the image processing module further includes a target screening submodule, and the image acquisition module, the image analysis module, and the image scaling submodule are all communicatively connected to the target screening submodule;
[0034] The target screening submodule performs target screening on the original image and the adjusted image based on the AIGC technology and transmits the results to the image analysis module;
[0035] The image acquisition module acquires the original image and transmits it to the target screening submodule;
[0036] The image scaling submodule transmits the adjusted image to the target screening submodule.
[0037] Optionally, when the control module calculates the target screening matching factor, the following formula is satisfied:
[0038]
[0039] μ=a*b;
[0040]
[0041] Among them, Z is the target screening matching factor, ε1 is the scaling weight index, β is the scaling factor of the adjusted image, μ is the total number of cells that make up the screening frame, ε2 is the brightness change weight index, and I is the total number of preset extension lines. is the average brightness of all cells on the i-th extended line in the original image, To adjust the average brightness of all units on the i-th extended line in the image, D i is the reference index of the i-th extended line, is the maximum value of the unit brightness on the i-th extended line in the original image, is the minimum value of the brightness of the unit located on the i-th extended line in the original image, To adjust the maximum value of the brightness of the unit located on the i-th extended line in the image, To adjust the minimum value of the brightness of the unit located on the i-th extended line in the image;
[0042] a is the total number of rows of cells that make up the filter box, and b is the total number of columns and rows of cells that make up the filter box.
[0043] Optionally, when the control module calculates the target screening assessment information, the following formula is satisfied:
[0044]
[0045] Among them, TG is the target screening assessment information, z sd It is the selection threshold of the target screening matching factor. When TG=1, the repair target screening is correct and no alarm processing is required. When TG=2, the repair target screening is wrong and an alarm processing is required.
[0046] The beneficial effects achieved by the present invention are:
[0047] 1. Determine whether the adjusted image after scaling is distorted by the average structural similarity between the original image and the adjusted image. When the calculated quality information of the adjusted image does not meet the standard, the corresponding adjusted image is discarded, and the original image is rescaled to form a new adjusted image, which is beneficial to the subsequent image restoration operation and helps to improve the effect of image restoration;
[0048] 2. The target screening evaluation information is obtained through the control module. The target screening evaluation information can provide timely feedback on whether the target screening is correct. When the target screening is wrong, the corresponding adjusted image after screening is invalidated, and the position of the screening frame on the adjusted image is moved again. The target screening matching factor is calculated again through the control module. Therefore, the control module can directly determine whether the target screening is correct. The above operation is relatively convenient and is conducive to subsequent image repair operations.
[0049] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of the method of the present invention;
[0051] Figure 2 is the original image in the present invention;
[0052] Figure 3 It is a schematic diagram of the overall structure of the present invention;
[0053] Figure 4 It is a structural schematic diagram of the image processing module in the present invention;
[0054] Figure 5 This is a flow chart of the method of Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0055] The following is an explanation of the embodiments of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not depicted according to actual dimensions. It is stated in advance. The following embodiments will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention.
[0056] Embodiment 1: This embodiment provides an image restoration method based on AIGC, combined with Figures 1 to 4 shown.
[0057] An image restoration method based on AIGC comprises the following steps:
[0058] S1: The image acquisition module acquires the original image and transmits it to the image processing module and the image analysis module;
[0059] S2: The image processing module scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module;
[0060] S3: The image analysis module analyzes the original image and the adjusted image based on the AIGC technology, and obtains the brightness similarity of the original image and the adjusted image obtained by the i-th detection, the contrast similarity of the original image and the adjusted image obtained by the i-th detection, the structural similarity of the original image and the adjusted image obtained by the i-th detection, the resolution of the adjusted image and the resolution of the original image, and transmits the information to the control module; the brightness similarity is the brightness similarity of the original image and the adjusted image, the contrast similarity is the contrast similarity of the original image and the adjusted image, and the structural similarity is the structural similarity of the original image and the adjusted image;
[0061] S4: The control module calculates a resolution difference according to the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections according to the resolution difference, calculates the average structural similarity of the original image and the adjusted image according to the relevant information, obtains quality information of the adjusted image according to the average structural similarity of the original image and the adjusted image, and synchronously transmits the quality information of the adjusted image to the communication module and the alarm module;
[0062] S5: The communication module transmits the quality information of the adjusted image to the user end;
[0063] S6: The alarm module implements an alarm based on the quality information of the adjusted image.
[0064] Optionally, the image processing module includes an image scaling submodule, and the image acquisition module and the image analysis module are both communicatively connected to the image scaling submodule;
[0065] The image scaling submodule scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module;
[0066] The image acquisition module acquires the original image and transmits it to the image scaling submodule.
[0067] Optionally, when the control module calculates the average structural similarity between the original image and the adjusted image, the following formula is satisfied:
[0068]
[0069] FB c =fb after -fb before ;
[0070] Where ΔSSIM(x, y) is the average structural similarity between the original image and the adjusted image, x is the original image, y is the adjusted image, I is the total number of detections, and L(x, y) i is the brightness similarity between the original image and the adjusted image obtained by the i-th detection, C(x, y) i is the contrast similarity between the original image and the adjusted image obtained by the i-th detection, S(x, y) i The structural similarity between the original image and the adjusted image obtained by the i-th detection;
[0071] FB c is the resolution difference;
[0072] fb after To adjust the image resolution, fb before is the resolution of the original image.
[0073] Specifically, the original image refers to an image that has not been resized after being captured, and the resized image refers to an image that has been resized (scaling processing is performed relative to the original image).
[0074] Optionally, when the control module calculates the quality information of the adjusted image, the following formula is satisfied:
[0075]
[0076] Among them, ZL is the quality information of the adjusted image, is the selection threshold of the average structural similarity between the original image and the adjusted image. When ZL=1, the scaling process of the adjusted image does not meet the standard and needs alarm processing. When ZL=2, the scaling process of the adjusted image meets the standard and does not need alarm processing.
[0077] Specifically, when ZL = 1, it is verified that the scaling process does not meet the standard, the adjusted image is invalidated, and the step returns to S2, the image processing module scales the original image to the adjusted image again, and then continues the subsequent steps until ZL = 2. The above method can verify whether the scaling process of the image processing module meets the standard, facilitate the subsequent image restoration operation, and improve the accuracy and precision of the image restoration.
[0078] Optionally, in step S2, the image processing module performs target screening on the original image and the adjusted image based on the AIGC technology and transmits them to the image analysis module;
[0079] In step S3, the image analysis module analyzes the original image and the adjusted image after target screening based on the AIGC technology, and obtains the scaling weight index, the scaling factor of the adjusted image, the brightness change weight index, the average value of the brightness of all units on the ith extended line in the original image, the average value of the brightness of all units on the ith extended line in the adjusted image, the reference index of the ith extended line, the maximum value of the brightness of the unit on the ith extended line in the original image, the minimum value of the brightness of the unit on the ith extended line in the original image, the maximum value of the brightness of the unit on the ith extended line in the adjusted image, the minimum value of the brightness of the unit on the ith extended line in the adjusted image, the total number of rows of units constituting the screening frame, and the total number of columns and rows of units constituting the screening frame, and transmits the information to the control module;
[0080] In step S4, the control module calculates the total number of preset extension lines and the total number of cells constituting the filter frame according to the total number of rows and columns of cells constituting the filter frame, calculates the target screening matching factor according to the relevant information, obtains the target screening evaluation information according to the target screening matching factor and transmits it to the communication module and the alarm module synchronously;
[0081] In step S5, the communication module transmits the target screening and evaluation information to the user end;
[0082] In step S6, the alarm module implements an alarm according to the target screening and evaluation information.
[0083] Optionally, the image processing module further includes a target screening submodule, and the image acquisition module, the image analysis module, and the image scaling submodule are all communicatively connected to the target screening submodule;
[0084] The target screening submodule performs target screening on the original image and the adjusted image based on the AIGC technology and transmits the results to the image analysis module;
[0085] The image acquisition module acquires the original image and transmits it to the target screening submodule;
[0086] The image scaling submodule transmits the adjusted image to the target screening submodule.
[0087] Optionally, when the control module calculates the target screening matching factor, the following formula is satisfied:
[0088]
[0089] μ=a*b;
[0090]
[0091] Among them, Z is the target screening matching factor, ε1 is the scaling weight index, β is the scaling factor of the adjusted image, μ is the total number of cells that make up the screening frame, ε2 is the brightness change weight index, and I is the total number of preset extension lines. is the average brightness of all cells on the i-th extended line in the original image, To adjust the average brightness of all cells on the i-th extended line in the image, D i is the reference index of the i-th extended line, is the maximum value of the unit brightness on the i-th extended line in the original image, is the minimum value of the brightness of the unit located on the i-th extended line in the original image, To adjust the maximum value of the brightness of the unit located on the i-th extended line in the image, To adjust the minimum value of the brightness of the unit located on the i-th extended line in the image;
[0092] a is the total number of rows of cells that make up the filter box, and b is the total number of columns and rows of cells that make up the filter box.
[0093] The scaling weight index and brightness change weight index are adjusted by staff in response to specific circumstances and needs.
[0094] Optionally, when the control module calculates the target screening assessment information, the following formula is satisfied:
[0095]
[0096] Among them, TG is the target screening assessment information, z sdIt is the selection threshold of the target screening matching factor. When TG=1, the repair target screening is correct and no alarm processing is required. When TG=2, the repair target screening is wrong and an alarm processing is required.
[0097] Specifically, when TG = 2, the repair target screening error is verified, and the step returns to S2. The image processing module performs target screening on the original image and the adjusted image again based on the AIGC technology and transmits them to the image analysis module, and then continues the subsequent steps until TG = 1. The above method can verify whether the target screening of the image processing module meets the standard, which is convenient for subsequent image repair operations and improves the accuracy and precision of image repair.
[0098] Specifically, the following matters need to be noted when calculating the zoom factor of the adjusted image. The zoom factor refers to the multiple by which the adjusted image is enlarged or reduced relative to the original image size after the adjustment. The total number of preset extended lines refers to the total number of lines drawn in the filter box along different extension directions. When the total number of preset extended lines is 4, it is divided into the first extended line, the second extended line, the third extended line and the fourth extended line, and the first extended line, the second extended line, the third extended line and the fourth extended line are set not to overlap. The average value of the brightness of all units on the i-th extended line in the original image can be understood as follows: put the filter box in the original image, and then draw the i-th extended line in the filter box. At this time, the brightness corresponding to each unit passed by the i-th extended line is added and then divided by the total number of units passed by the i-th extended line to obtain the average value. The total number of units in the filter box is a*b. The calculation of the average value of the brightness of all units on the i-th extended line in the original image can be illustrated by example: refer to Figure 2 As shown, since the total number of rows of cells constituting the filter box plus the total number of columns of cells constituting the filter box is equal to 4, the total number of corresponding preset extension lines is 2. Figure 2 In the figure, two extended lines are schematically drawn in the filter box, the brightness of the upper left corner is 60, the brightness of the lower left corner is 65, the brightness of the upper right corner is 66, and the brightness of the lower right corner is 80. Taking the calculation of the average brightness of all units on the first extended line in the original image as an example, 60 plus 80 equals 140 divided by 2 equals 70; when calculating the reference index of the ith extended line, the following matters need to be noted: when the total number of units passed through in the ith extended line is greater, the corresponding reference index of the ith extended line is greater. For example, the total number of units passed through in the ith extended line multiplied by 2 is set to be equal to the reference index of the ith extended line; the calculation of the maximum value of the brightness of the unit located on the ith extended line in the original image can be illustrated by example: refer to Figure 2 As shown, taking the calculation of the maximum value of the brightness of the unit located on the first extended line in the original image as an example, the maximum value is 80.
[0099] Specifically, the target screening steps involved in the target screening submodule in step S2 are described in detail below. First, the target screening submodule has acquired the original image and the adjusted image, and the target screening submodule forms a screening frame. Based on the AIGC technology, the screening frame selects the position that needs to be repaired in the original image, and then changes the size of the screening frame in the adjusted image by one-to-one according to the zoom factor of the adjusted image. The resized screening frame selects the position that needs to be repaired in the adjusted image based on the AIGC technology. Since the original image and the adjusted image are different, the target selected by the screening frame in the adjusted image does not necessarily correspond to the target selected by the screening frame in the original image, so it is necessary to use the control module to calculate the target screening matching factor and obtain the target screening evaluation information.
[0100] Although no specific units are provided for the above formula in this embodiment, those skilled in the art will certainly set appropriate units according to the needs of actual applications.
[0101] This embodiment solves the problem that the traditional image restoration direction cannot determine whether the scaling process meets the standards. Specifically, this embodiment determines whether the adjusted image after scaling is distorted through the average structural similarity between the original image and the adjusted image. When the calculated quality information of the adjusted image is assessed to be non-compliant with the standards, the corresponding adjusted image is invalidated, and the original image is re-scaled to form a new adjusted image, which is beneficial to subsequent image restoration operations and helps to improve the effect of image restoration.
[0102] In addition, the target screening evaluation information is obtained through the control module, and the target screening evaluation information can provide timely feedback on whether the target screening is correct. When the target screening is wrong, the corresponding adjusted image after screening is invalidated, and the position of the screening box on the adjusted image is moved again, and the target screening matching factor is calculated again through the control module. Therefore, the control module can directly determine whether the target screening is correct. The above operation is relatively convenient and is conducive to subsequent image repair operations.
[0103] Embodiment 2: This embodiment includes all the contents of Embodiment 1, and provides an image restoration method based on AIGC, combined with Figure 5 shown.
[0104] An image restoration method based on AIGC comprises the following steps:
[0105] S1: The image acquisition module acquires the original image and transmits it to the image processing module and the image analysis module;
[0106] S2: The image processing module scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module;
[0107] S3: The image analysis module analyzes the original image and the adjusted image based on the AIGC technology, and obtains the bit depth of the original image, the brightness similarity of the original image and the adjusted image obtained by the i-th detection, the contrast similarity of the original image and the adjusted image obtained by the i-th detection, the structural similarity of the original image and the adjusted image obtained by the i-th detection, the resolution of the adjusted image and the resolution of the original image, and transmits the information to the control module;
[0108] S4: The control module calculates the resolution difference according to the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections according to the resolution difference, calculates the average structural similarity of the original image and the adjusted image according to the relevant information, obtains the quality information of the adjusted image according to the average structural similarity of the original image and the adjusted image, obtains the corresponding range value of the total number of rows of cells constituting the filter frame and the corresponding range value of the total number of columns and rows of cells constituting the filter frame according to the bit depth of the original image, and synchronously transmits the quality information of the adjusted image to the communication module and the alarm module; since the larger the bit depth value, the more color types of the image are composed of, it is necessary to set more total number of rows of cells constituting the filter frame and the corresponding total number of columns and rows of cells constituting the filter frame, although the current The higher the precision of the standard screening matching factor, the greater the amount of calculation, which brings unnecessary calculation burden to the control module. Therefore, this scheme obtains the corresponding range value of the total number of rows of cells constituting the filter frame and the corresponding range value of the total number of columns and rows of cells constituting the filter frame according to the bit depth of the original image. The specific settings can be as follows: suppose the combination box is in the form of a*b. When the bit depth of the original image is less than or equal to 8, the corresponding total number of rows of cells constituting the filter frame is greater than or equal to 2; then a*b is 4, but when the bit depth of the original image is equal to 36, the corresponding total number of rows of cells constituting the filter frame is greater than or equal to 10, and the corresponding total number of columns and rows of cells constituting the filter frame is greater than or equal to 10; then a*b is equal to 100;
[0109] S5: The communication module transmits the quality information of the adjusted image to the user end;
[0110] S6: The alarm module implements an alarm based on the quality information of the adjusted image.
[0111] Optionally, in step S4, when the bit depth of the original image is less than or equal to 8, the corresponding total number of rows of cells constituting the filter box is greater than or equal to 2, and the corresponding total number of column rows of cells constituting the filter box is greater than or equal to 2; when the bit depth of the original image is equal to 16, the corresponding total number of rows of cells constituting the filter box is greater than or equal to 3, and the corresponding total number of column rows of cells constituting the filter box is greater than or equal to 3; when the bit depth of the original image is equal to 24, the corresponding total number of rows of cells constituting the filter box is greater than or equal to 8, and the corresponding total number of column rows of cells constituting the filter box is greater than or equal to 8; when the bit depth of the original image is equal to 36, the corresponding total number of rows of cells constituting the filter box is greater than or equal to 10, and the corresponding total number of column rows of cells constituting the filter box is greater than or equal to 10.
[0112] Specifically, the greater the bit depth of the original image, the greater the number of corresponding colors. Therefore, a greater number of total rows and columns of cells constituting the filter box can be set, thereby improving the accuracy of the value calculated by the control module.
[0113] This embodiment solves the problem that traditional image restoration methods cannot limit the specifications of the filter frame. Specifically, this embodiment calculates the corresponding range value of the total number of rows of cells that make up the filter frame and the corresponding range value of the total number of columns and rows of cells that make up the filter frame through the control module, so as to accurately obtain the filter frame specifications and help improve the efficiency of image restoration.
[0114] The contents disclosed above are only preferred feasible embodiments of the present invention, and do not limit the protection scope of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention description and drawings are included in the protection scope of the present invention. In addition, the elements therein can be updated as technology develops.
Claims
1. An image restoration method based on AIGC, characterized in that: The following steps are involved: S1: The image acquisition module acquires the original image and transmits it to the image processing module and the image analysis module; S2: The image processing module scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module; S3: The image analysis module analyzes the original image and the adjusted image based on the AIGC technology, and obtains the brightness similarity between the original image and the adjusted image obtained by the i-th detection, the contrast similarity between the original image and the adjusted image obtained by the i-th detection, the structural similarity between the original image and the adjusted image obtained by the i-th detection, the resolution of the adjusted image and the resolution of the original image, and transmits the information to the control module; S4: the control module calculates the resolution difference according to the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections according to the resolution difference, calculates the average structural similarity of the original image and the adjusted image according to the brightness similarity of the original image and the adjusted image obtained by the i-th detection in the above step S3, the contrast similarity of the original image and the adjusted image obtained by the i-th detection, the structural similarity of the original image and the adjusted image obtained by the i-th detection, the resolution of the adjusted image and the resolution of the original image, calculates the quality information of the adjusted image according to the average structural similarity of the original image and the adjusted image, and synchronously transmits the quality information of the adjusted image to the communication module and the alarm module; S5: The communication module transmits the quality information of the adjusted image to the user end; S6: The alarm module implements an alarm according to the quality information of the adjusted image; When the control module calculates the average structural similarity between the original image and the adjusted image, the following formula is satisfied: Facebook c =fb after -fb before ; Where ΔSSIM(x, y) is the average structural similarity between the original image and the adjusted image, x is the original image, y is the adjusted image, I is the total number of detections, and L(x, y) i is the brightness similarity between the original image and the adjusted image obtained by the i-th detection, C(x, y) i is the contrast similarity between the original image and the adjusted image obtained by the i-th detection, S(x, y) i The structural similarity between the original image and the adjusted image obtained by the i-th detection; FB c is the resolution difference; fb after To adjust the image resolution, fb before is the resolution of the original image.
2. The AIGC-based image restoration method according to claim 1, characterized in that: The image processing module includes an image scaling submodule, and the image acquisition module and the image analysis module are both communicatively connected to the image scaling submodule; The image scaling submodule scales the original image into an adjusted image based on the AIGC technology, and transmits the adjusted image to the image analysis module; The image acquisition module acquires the original image and transmits it to the image scaling submodule.
3. The AIGC-based image restoration method according to claim 2, characterized in that: When the control module calculates and adjusts the quality information of the image, the following formula is satisfied: Among them, ZL is the quality information of the adjusted image, is the selection threshold of the average structural similarity between the original image and the adjusted image. When ZL=1, the scaling process of the adjusted image does not meet the standard and needs alarm processing. When ZL=2, the scaling process of the adjusted image meets the standard and does not need alarm processing.
4. The AIGC-based image restoration method according to claim 3, characterized in that: In step S2, the image processing module performs target screening on the original image and the adjusted image based on the AIGC technology and transmits them to the image analysis module; In step S3, the image analysis module analyzes the original image and the adjusted image after target screening based on the AIGC technology, and obtains the scaling weight index, the scaling factor of the adjusted image, the brightness change weight index, the average value of the brightness of all units on the ith extended line in the original image, the average value of the brightness of all units on the ith extended line in the adjusted image, the reference index of the ith extended line, the maximum value of the brightness of the unit on the ith extended line in the original image, the minimum value of the brightness of the unit on the ith extended line in the original image, the maximum value of the brightness of the unit on the ith extended line in the adjusted image, the minimum value of the brightness of the unit on the ith extended line in the adjusted image, the total number of rows of units constituting the screening frame, and the total number of columns and rows of units constituting the screening frame, and transmits the information to the control module; In step S4, the control module calculates the total number of preset extension lines and the total number of cells constituting the filter frame according to the total number of rows and columns of cells constituting the filter frame, calculates the target screening matching factor according to the relevant information, obtains the target screening evaluation information according to the target screening matching factor and transmits it to the communication module and the alarm module synchronously; In step S5, the communication module transmits the target screening and evaluation information to the user end; In step S6, the alarm module implements an alarm according to the target screening and evaluation information; When the control module calculates the target screening matching factor, the following formula is satisfied: μ=a*b; Among them, Z is the target screening matching factor, ε1 is the scaling weight index, β is the scaling factor of the adjusted image, μ is the total number of cells that make up the screening frame, ε2 is the brightness change weight index, and I is the total number of preset extension lines. is the average brightness of all cells on the i-th extended line in the original image, To adjust the average brightness of all units on the i-th extended line in the image, D i is the reference index of the i-th extended line, is the maximum value of the unit brightness on the i-th extended line in the original image, is the minimum value of the brightness of the unit located on the i-th extended line in the original image, To adjust the maximum value of the brightness of the unit located on the i-th extended line in the image, To adjust the minimum value of the brightness of the unit located on the i-th extended line in the image; a is the total number of rows of cells that make up the filter box, and b is the total number of columns and rows of cells that make up the filter box; The more total number of units passed through the i-th extension line, the larger the value of the corresponding reference index of the i-th extension line. For example, the total number of units passed through the i-th extension line multiplied by 2 is set to be equal to the reference index of the i-th extension line.
5. The AIGC-based image restoration method according to claim 4, characterized in that: The image processing module also includes a target screening submodule, and the image acquisition module, image analysis module, and image scaling submodule are all communicatively connected to the target screening submodule; The target screening submodule performs target screening on the original image and the adjusted image based on the AIGC technology and transmits the results to the image analysis module; The image acquisition module acquires the original image and transmits it to the target screening submodule; The image scaling submodule transmits the adjusted image to the target screening submodule.
6. The AIGC-based image restoration method according to claim 5, characterized in that: When the control module calculates the target screening assessment information, the following formula is satisfied: Among them, TG is the target screening assessment information, z sd It is the selection threshold of the target screening matching factor. When TG=1, the repair target screening is correct and no alarm processing is required. When TG=2, the repair target screening is wrong and an alarm processing is required.
Citation Information
Patent Citations
Image processing method and device based on AI
CN114199157A
Deep learning-based wheel set light bar image restoration method
CN113096037A
Methods and apparatus for image restoration
GB9110119D0
Systems and Methods for Multi-Resolution Inpainting
US20140064614A1
Video processing method, video repair method, apparatus and device
WO2021093718A1