An image restoration method based on AIGC
Through the AIGC-based image restoration method, brightness, contrast and structural similarity calculations are used to judge the image scaling quality and implement alarms or readjustments, which solves the problem of distortion in image restoration and improves the accuracy and precision of restoration.
Patent Information
- Application Number
- CN202411761703.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The image restoration methods in the existing technology easily cause image distortion during the magnification process and lack effective judgment and adjustment mechanisms.
An AIGC-based image restoration method is used to judge the quality of image scaling by calculating the brightness similarity, contrast similarity, structural similarity and resolution difference between the original image and the adjusted image. The control module then issues an alarm or performs readjustment to ensure the accuracy of image restoration.
It effectively avoids image scaling distortion, improves the accuracy and precision of image restoration, and ensures the smooth progress of subsequent operations.
Smart Images

Figure CN119693278B_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 represents a milestone for human society and artificial intelligence. In the short term, AIGC transforms fundamental productivity tools; in the medium term, it will alter social production relations; and in the long term, it will drive a qualitative breakthrough in overall social productivity. Furthermore, AIGC elevates data to the core resource of our era, accelerating society's digital transformation to a certain extent.
[0003] AIGC is the cumulative fusion of multiple technologies, including GAN, CLIP, Transformer, Diffusion, pre-trained models, multimodal technology, and generative algorithms. The continuous innovation and iteration of these technologies have triggered a qualitative change in AIGC, making it more versatile and possessing stronger fundamental 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 an 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 in the scanned image. During the repair process, in order to facilitate the extraction of the target repair location, the scanned image will be enlarged before the repair process is performed.
[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 solutions:
[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 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 brightness similarity between the original image and the adjusted image obtained by the i-th detection, contrast similarity between the original image and the adjusted image obtained by the i-th detection, structural similarity between the original image and the adjusted image obtained by the i-th detection, and 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 based on the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections based on the resolution difference, calculates an average structural similarity between the original image and the adjusted image based on relevant information, obtains quality information of the adjusted image based on the average structural similarity between 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] Facebook 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] Facebook 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, It 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 requires alarm processing. When ZL=2, the scaling process of the adjusted image meets the standard and does not require 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 the results 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 information including a scaling weight index, a scaling factor of the adjusted image, a brightness change weight index, an average value of the brightness of all units on the i-th extended line in the original image, an average value of the brightness of all units on the i-th extended line in the adjusted image, a reference index of the i-th extended line, a maximum value of the brightness of the units on the i-th extended line in the original image, a minimum value of the brightness of the units on the i-th extended line in the original image, a maximum value of the brightness of the units on the i-th extended line in the adjusted image, a minimum value of the brightness of the units on the i-th extended line in the adjusted image, the total number of rows of cells constituting the screening frame, and a total number of columns and rows of cells 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 extended lines and the total number of cells constituting the filter frame based on the total number of rows and columns of cells constituting the filter frame, calculates the target screening fit factor based on the relevant information, and obtains the target screening assessment information based on the target screening fit factor and synchronously transmits it to the communication module and the alarm module;
[0031] In step S5, the communication module transmits the target screening and evaluation information to the user terminal;
[0032] In step S6, the alarm module implements an alarm based on the target screening and evaluation information.
[0033] Optionally, the image processing module further 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;
[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 units 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 units 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 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 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. The average structural similarity between the original image and the adjusted image is used to determine whether the adjusted image after scaling is distorted. If 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 for subsequent image restoration operations and helps improve the image restoration effect.
[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, the position of the screening frame 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.
[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 illustration 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 Schematic diagram of the structure 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 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 for 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] Example 1: This example 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 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 brightness similarity between the original image and the adjusted image obtained by the i-th detection, contrast similarity between the original image and the adjusted image obtained by the i-th detection, structural similarity between the original image and the adjusted image obtained by the i-th detection, resolution of the adjusted image and resolution of the original image, and transmits the information to the control module; the brightness similarity is the brightness similarity between the original image and the adjusted image, the contrast similarity is the contrast similarity between the original image and the adjusted image, and the structural similarity is the structural similarity between the original image and the adjusted image;
[0061] S4: The control module calculates a resolution difference based on the resolution of the adjusted image and the resolution of the original image, calculates the total number of detections based on the resolution difference, calculates an average structural similarity between the original image and the adjusted image based on relevant information, obtains quality information of the adjusted image based on the average structural similarity between 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] Facebook 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] Facebook 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 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, It 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 requires alarm processing. When ZL=2, the scaling process of the adjusted image meets the standard and does not require alarm processing.
[0077] Specifically, when ZL = 1, it is verified that the scaling process does not meet the standards, 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 standards, facilitate subsequent image restoration operations, and improve the accuracy and precision of 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 the results 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 information including a scaling weight index, a scaling factor of the adjusted image, a brightness change weight index, an average value of the brightness of all units on the i-th extended line in the original image, an average value of the brightness of all units on the i-th extended line in the adjusted image, a reference index of the i-th extended line, a maximum value of the brightness of the units on the i-th extended line in the original image, a minimum value of the brightness of the units on the i-th extended line in the original image, a maximum value of the brightness of the units on the i-th extended line in the adjusted image, a minimum value of the brightness of the units on the i-th extended line in the adjusted image, the total number of rows of cells constituting the screening frame, and a total number of columns and rows of cells 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 extended lines and the total number of cells constituting the filter frame based on the total number of rows and columns of cells constituting the filter frame, calculates the target screening fit factor based on the relevant information, and obtains the target screening assessment information based on the target screening fit factor and synchronously transmits it to the communication module and the alarm module;
[0081] In step S5, the communication module transmits the target screening and evaluation information to the user terminal;
[0082] In step S6, the alarm module implements an alarm based on the target screening and evaluation information.
[0083] Optionally, the image processing module further 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;
[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 units 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 units 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 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 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, it is verified that the restoration target screening error occurred, and the step returns to S2. The image processing module again 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 subsequent steps are then continued until TG = 1. This method can verify whether the target screening of the image processing module meets the standard, facilitate subsequent image restoration operations, and improve the accuracy and precision of image restoration.
[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; 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 brightness of all units on the i-th extended line in the original image can be understood as follows: place 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 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, with the brightness of the upper left corner being 60, the brightness of the lower left corner being 65, the brightness of the upper right corner being 66, and the brightness of the lower right corner being 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, which is then divided by 2 to equal 70; when calculating the reference index of the ith extended line, the following matters need to be noted: the more the total number of units passed through in the ith extended line, the larger the value of the corresponding reference index of the ith extended line. For example, the total number of units passed through in the ith extended line multiplied by 2 is equal to the reference index of the ith extended line; the calculation of the maximum brightness of the units on the ith extended line in the original image can be illustrated by referring 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 obtained the original image and the adjusted image. 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 set in the adjusted image in a one-to-one ratio 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 the above formula does not provide specific units 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 does not meet 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 repair target screening is correct. When the repair target screening is wrong, the corresponding adjusted image after screening is invalidated, and the position of the filter 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 judge whether the target screening is correct. The above operation is relatively convenient and is conducive to subsequent image repair operations.
[0103] Example 2: This example includes all the contents of Example 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 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 information about the bit depth of the original image, 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;
[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 accuracy of the standard screening matching factor, the greater the amount of calculation, which brings unnecessary calculation burden to the control module. Therefore, this solution 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. Specifically, it can be set as follows: assuming that 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 values 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 constitute the filter frame and the corresponding range value of the total number of columns and rows of cells that constitute the filter frame through the control module, which can accurately obtain the filter frame specifications and help improve image restoration efficiency.
[0114] The contents disclosed above are only preferred feasible embodiments of the present invention and do not limit the scope of protection of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention description and drawings are included in the scope of protection 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 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 AIGC technology, and obtains the The brightness similarity of the original image and the adjusted image obtained by the first detection, The contrast similarity between the original image and the adjusted image obtained by the first detection, The structural similarity of the original image and the adjusted image, the resolution of the adjusted image and the resolution of the original image obtained by the second detection are transmitted to the control module; S4: The control module calculates the resolution difference between the adjusted image and the original image, and calculates the total number of detections based on the resolution difference. The brightness similarity of the original image and the adjusted image obtained by the first detection, The contrast similarity between the original image and the adjusted image obtained by the first detection, The average structural similarity of the original image and the adjusted image is calculated based on the structural similarity of the original image and the adjusted image, the resolution of the adjusted image and the resolution of the original image, the quality information of the adjusted image is obtained based on the average structural similarity of the original image and the adjusted image, and the quality information of the adjusted image is synchronously transmitted 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 the alarm according to the adjusted image quality information; When the control module calculates the average structural similarity between the original image and the adjusted image, the following formula is satisfied: ; ; ; in, is the average structural similarity between the original image and the adjusted image, is the original image, To adjust the image, is the total number of detections, For the The brightness similarity between the original image and the adjusted image obtained by this detection, For the The contrast similarity between the original image and the adjusted image obtained by this detection, For the The structural similarity between the original image and the adjusted image obtained by the second detection; is the resolution difference; To adjust the image resolution, is the resolution of the original image.
2. The image restoration method based on AIGC 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, wherein: When the control module calculates and adjusts the quality information of the image, the following formula is satisfied: ; in, To adjust the image quality information, is the threshold for selecting the average structural similarity between the original image and the adjusted image. When the image scaling does not meet the standards, an alarm is required. When the image scaling is adjusted to meet the standards, no alarm processing is required.
4. The image restoration method based on AIGC 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 original image at the first The average brightness of all cells on the extended line, the average brightness of the cells in the adjusted image at The average value of all unit brightness on the extended line, The reference index of the extended line, the original image at The maximum value of the unit brightness on the extended line, the maximum value of the unit brightness on the original image The minimum brightness of the cells on the extended lines, the ... The maximum value of the brightness of the cells on the extended lines, the ... The minimum brightness value of the cells on the extended lines, the total number of rows of cells constituting the filter frame, and the total number of columns and rows of cells constituting the filter frame are collected and transmitted to the control module; In step S4, the control module calculates the total number of preset extended lines and the total number of cells constituting the filter frame based on the total number of rows and columns of cells constituting the filter frame, calculates the target screening fit factor based on the relevant information, and obtains the target screening assessment information based on the target screening fit factor and synchronously transmits it to the communication module and the alarm module; In step S5, the communication module transmits the target screening and evaluation information to the user terminal; In step S6, the alarm module implements the alarm according to the target screening assessment information; When the control module calculates the target screening matching factor, the following formula is satisfied: ; ; ; in, Screening matching factors for the target, is the scaling weight exponent, To adjust the image zoom, is the total number of cells that make up the filter box, is the brightness change weight index, is the total number of preset extension lines, The original image is located at The average value of the brightness of all cells on the extended line, To adjust the image at The average value of all unit brightness on the extended line, For the The reference index of the extended lines, The original image is located at The maximum value of the cell brightness on the extended lines, The original image is located at The minimum value of the brightness of the cells on the extended lines, To adjust the image at The maximum value of the cell brightness on the extended lines, To adjust the image at The minimum value of the brightness of the cells on the extended lines; is the total number of rows of cells that make up the filter box, The total number of columns and rows of cells that make up the filter box; When The more units the extended line passes through, the more The larger the value of the reference index of the extended line.
5. The image restoration method based on AIGC 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 in communication connection with 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 image restoration method based on AIGC according to claim 5, characterized in that: When the control module calculates the target screening assessment information, the following formula is satisfied: ; in, Filter and evaluate information for your goals. The selection threshold of the matching factor for the target screening is When the target is correctly selected for repair, no alarm processing is required. When an alarm is required to fix the target screening error.
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