Image resource restoration control method and system based on image processing
Through image processing-based technology, partition tag repair and inter-frame optimization, the problems of physical damage and image quality degradation in old image resources are solved, and high-quality repair and preservation of image resources are achieved.
Patent Information
- Application Number
- CN202510091939.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-21
AI Technical Summary
During the preservation process, old image resources are prone to physical damage, image quality degradation, noise interference and inter-frame discontinuity, which affects their viewing effect and the quality of digital storage.
The image resource repair control method based on image processing is adopted, and the input image data is received, preprocessing and feature extraction is performed, image partitioning and annotation is used using vertical models, repairing based on partition labels, and inter-frame dynamic sequence optimization and global consistency optimization are performed, and high-quality repaired image data is finally generated.
It has achieved comprehensive restoration of old image resources from single frames to sequences, improved the overall quality of image resources, restored its historical and artistic value, and improved the commercialization and digital preservation value of images.
Smart Images

Figure CN119515741B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital image processing technology, and in particular to an image resource restoration control method and system based on image processing. Background Art
[0002] With the rapid development of digital technology and the increasing demand for cultural heritage protection, the restoration and digital processing of old image resources have gradually become an important topic in the fields of film, television, museums and cultural heritage protection. These old image resources, including classic film and television dramas and documentaries, not only record the cultural features and social background of historical periods, but also carry important artistic value and commercial development potential. However, due to the limitations of early shooting and storage technologies, these image resources inevitably suffer from physical damage, image quality degradation, noise interference, and inter-frame discontinuity during the preservation process, which seriously affects their viewing effect and the quality of digital storage.
[0003] The images of traditional movies and TV series are mostly stored on film media. As a chemical photosensitive material, film has high sensitivity and good resolution, but it is also extremely fragile and easily affected by the external environment and operating conditions. For example, during storage or projection, due to mechanical friction between the film and the equipment, changes in environmental humidity or chemical degradation reactions, physical damage such as scratches and halos are often left in the image. In addition, oxidation and aging of the film surface may cause uneven brightness, color distortion or loss of details. These physical damages will not only directly affect the visual effect of the image, but may also further deteriorate over time, increasing the difficulty of repair.
[0004] Therefore, how to use advanced image processing technology based on the characteristics of old image resources to achieve comprehensive restoration from single frames to sequences and improve the overall quality of image resource restoration is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In order to improve the overall quality of image resource restoration, the present application provides an image resource restoration control method and system based on image processing.
[0006] In a first aspect, the present application provides an image resource repair control method based on image processing, which adopts the following technical solution. The repair control method includes:
[0007] receiving input image data;
[0008] Preprocessing the multiple frames of the image data respectively, and extracting image features of each frame of the image;
[0009] Based on the image features, each frame image is partitioned using a vertical classification model, and image partition labels are marked;
[0010] Repairing each of the frame images based on the image partition label to obtain a repaired frame image data set;
[0011] Performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain an optimized image sequence;
[0012] The optimized image sequence is subjected to global consistency optimization and dynamic fusion processing to obtain the final restored image data.
[0013] By adopting the above technical solution, each frame of the image data is divided into multiple different areas, and a differentiated restoration strategy is designed based on the characteristics of each area. The technical path of combining frame-by-frame restoration and dynamic sequence optimization is adopted, which not only improves the quality of single-frame images, but also ensures the fluency and coherence of the image sequence. Through global consistency optimization and fusion processing, the final image data is finally generated. This application realizes the comprehensive restoration of old film and TV series images from single frames to sequences, restores their historical and artistic value, and greatly improves the commercialization and digital preservation value of images, providing strong technical support for the digital protection and reuse of cultural heritage.
[0014] Optionally, based on the image features, using a vertical classification model to partition each frame image, and marking image partition labels includes:
[0015] Constructing a feature vector list of the frame image according to the image features of the frame image;
[0016] Preliminarily classifying the feature vector list based on a clustering algorithm to obtain a preliminary image partition mask matrix;
[0017] Performing connectivity analysis according to the preliminary image partition mask matrix to extract each image region;
[0018] Extracting image statistical features of each of the image regions according to the feature vector list;
[0019] Based on the pre-built vertical classification model, classification optimization is performed according to the image statistical characteristics of each image area to obtain an optimized regional classification mask matrix;
[0020] The region category, boundary coordinates and image statistical features of each image region are extracted according to the region classification mask matrix, the corresponding image partition label is generated and each image region is marked respectively.
[0021] By adopting the above technical solutions, we gradually build a list of feature vectors of frame images, use clustering algorithms to generate preliminary image partition mask matrices, and gradually improve the accuracy of partitions through connectivity analysis and vertical classification model optimization. We achieve efficient data conversion and feature extraction between the pixel level and the regional level, and the image partition label file generated in the end records the category, boundary and characteristics of each region in detail, providing accurate data support for the subsequent restoration of image resources.
[0022] Optionally, the area types of the image area include a static background area, a dynamic target area and a damaged area.
[0023] Optionally, the step of repairing the frame image based on the image partition label includes:
[0024] Read the image partition label, and extract the region category, boundary coordinates and image statistical features of each image region of the frame image;
[0025] Generate a corresponding restoration strategy according to the region category of each image region;
[0026] Generate a repair task queue based on the repair strategy, and repair each image area according to the repair task queue;
[0027] Each restored image region is spliced and fused based on the boundary coordinates, and the boundaries between adjacent image regions are smoothed to obtain restored frame image data.
[0028] By adopting the above technical solution, the image partition labels are parsed, the regional categories, boundaries and feature information are extracted, and a repair task queue is generated. Differentiated repair strategies are implemented for different categories of regions, achieving accurate repair of local problems such as scratches, halos, and dynamic blur. On this basis, through regional stitching and boundary smoothing, the overall visual effect of the repaired frame image is ensured to be natural and the details are prominent, which significantly improves the quality and viewing experience of the image. The above technical solution is efficient and innovative in regional restoration and global visual fusion, providing systematic technical support for the comprehensive restoration of old image resources.
[0029] Optionally, when the image area is a damaged area, the step of generating a corresponding repair strategy according to the damaged area includes:
[0030] Performing Gaussian pyramid decomposition on the damaged area of the frame image to generate a multi-scale image;
[0031] Detecting the scratch boundary of each scale in the multi-scale image based on the Sobel operator to obtain the scratch boundary position;
[0032] Based on brightness anomaly analysis, identifying the halo region range in the multi-scale image;
[0033] The severity of the injury is scored based on the scratch boundary location and the halo area range;
[0034] According to the damage severity scoring results, the scratch severity level and halo severity level were obtained;
[0035] A repair strategy corresponding to the damaged area is generated according to the scratch severity level and the halo severity level.
[0036] By adopting the above technical solutions, the scratches and halos in the damaged area are accurately located, the severity is assessed, and a targeted repair solution is designed. The multi-scale analysis method ensures comprehensive coverage of detail damage and global damage, and the scoring and grading strategies provide intelligent repair guidance. Ultimately, this technical solution provides an innovative solution for the automation and efficiency of image restoration, greatly improving the accuracy and applicability of image resource restoration.
[0037] Optionally, the step of performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain an optimized image sequence includes:
[0038] Extract image partition labels from the restored frame image data set, and identify the dynamic target area in each restored frame image;
[0039] Based on the target tracking algorithm, the motion trajectory of the dynamic target in the dynamic target area in the continuous frames is extracted and smoothed to obtain optimized motion trajectory information;
[0040] Analyze the motion trajectory information to detect the dynamic blur area between consecutive frames;
[0041] Performing trajectory interpolation compensation on the dynamic blur area based on the motion trajectory information, reconstructing the texture of the dynamic blur area based on a texture synthesis algorithm, and adjusting the brightness and color values based on the surrounding unblurred area of the dynamic blur area to obtain a reconstructed dynamic blur area;
[0042] Merging the reconstructed dynamic blur region into the restored frame image data set to obtain an optimized frame image data set;
[0043] The frame image data set is arranged in time sequence to obtain an optimized image sequence.
[0044] By adopting the above technical solutions, combined with trajectory interpolation, texture synthesis and brightness correction technology, the problems of motion blur and visual inconsistency are effectively solved. The optimized image sequence finally generated not only has the motion continuity of dynamic targets, but also achieves an improvement in the overall visual quality, providing reliable technical support for dynamic image restoration and enhancement.
[0045] Optionally, the steps of performing global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration include:
[0046] Extract the brightness characteristics of the optimized image sequence and perform brightness equalization processing;
[0047] Based on principal component analysis, tone correction is performed on the image sequence after brightness equalization processing, and multi-scale texture fusion is performed on the boundary area of the frame image in the image sequence, and pixel data of the boundary area is updated to obtain the image sequence after texture fusion;
[0048] Detecting the scene switching point in the texture-fused image sequence based on an inter-frame difference method, and determining the regional characteristic difference of the switching point according to the frame images on both sides of the scene switching point;
[0049] According to the regional characteristic differences of the switching points, a transition frame is generated based on a texture synthesis algorithm and inserted into the scene switching points to obtain an image sequence after dynamic fusion processing;
[0050] The image sequence after the dynamic fusion processing is arranged in chronological order to obtain the final image data after restoration.
[0051] By adopting the above technical solutions, the consistency and coherence of the image sequence in brightness, tone and texture are achieved, the visual abruptness between frames is effectively eliminated, the texture smoothness of the boundary area is optimized, and the fluency of scene switching is improved. Ultimately, restored image data with global visual coordination and high-quality presentation effects are generated, providing systematic and innovative technical support for film and television restoration and image enhancement.
[0052] In the second aspect, the present application provides an image resource restoration control system based on image processing, which adopts the following technical solutions:
[0053] An image resource repair control system based on image processing, the repair control system comprising:
[0054] A receiving module, used for receiving input image data;
[0055] An image processing module, used to pre-process the multiple frames of the image data respectively and extract image features of each frame of the image;
[0056] An image partitioning module, used to partition each frame image based on the image features using a vertical classification model, and mark image partition labels;
[0057] An image restoration module, used to restore each of the frame images based on the image partition label to obtain a restored frame image data set;
[0058] An image optimization module is used to optimize the inter-frame dynamic sequence of the restored frame image data set to obtain an optimized image sequence;
[0059] The final image data generation module is used to perform global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration.
[0060] In a third aspect, the present application provides a computer device, which adopts the following technical solution:
[0061] A computer device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect.
[0062] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0063] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the methods in the first aspect.
[0064] In summary, the present application includes at least one of the following beneficial technical effects: the present application can not only repair local damage in a single-frame image, such as scratches and halos, but also improve the coherence and visual consistency of the image sequence through inter-frame optimization and dynamic fusion, and effectively solve problems such as dynamic blur and abrupt scene switching. The high-quality image data finally generated has global coordination and temporal continuity in brightness, hue and texture characteristics, which significantly improves the overall viewing effect and practical value of image resources, and is suitable for practical application scenarios such as digital protection of old image resources, film and television post-processing and image enhancement. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a first flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application.
[0066] Figure 2 This is a second flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application.
[0067] Figure 3It is a third flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application.
[0068] Figure 4 This is a fourth flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application.
[0069] Figure 5 This is a fifth flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application.
[0070] Figure 6 It is a sixth flow chart of an image resource repair control method based on image processing according to one of the embodiments of the present application. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-6 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0072] The embodiment of the present application discloses an image resource repair control method based on image processing.
[0073] Reference Figure 1 , an image resource repair control method based on image processing, the repair control method comprises:
[0074] Step S101, receiving input image data;
[0075] The input image data is derived from old image resources, including image sequence files of old movies and TV series, and the image sequence files have a continuous frame image sequence.
[0076] It is understandable that before processing the image sequence file, file parsing is required to decompose the image sequence into single-frame images for frame-by-frame processing. The extraction of each frame is based on a fixed frame rate (such as 24fps or 30fps) to ensure that the order of the frame sequence on the timeline is consistent, and then re-synthesize into an image sequence after each frame is processed.
[0077] Step S102, pre-processing the multiple frames of image data respectively, and extracting image features of each frame of image;
[0078] The preprocessing step includes removing large-scale noise from old images, standardizing the color space and resolution of the images, and ensuring the consistency of the input of subsequent algorithms. At the same time, basic image features are established and extracted for each frame of the image, including brightness histogram (reflecting the distribution of light), texture direction features (identifying regional structural characteristics), and pixel gradient information (detecting edge details).
[0079] Step S103, based on the image features, each frame image is partitioned using a vertical classification model, and image partition labels are marked;
[0080] Among them, the vertical classification model automatically divides the image area (static background area, dynamic target area, damaged area) according to specific information (such as image structure and material) and feature input. The classification of each area is based on feature similarity and spatial distribution characteristics. The image partition label records the category, location coordinates and image features of each area, providing a basis for regional restoration.
[0081] In some embodiments, the static background may be a wall, the sky, etc., the dynamic target may be a moving person, a vehicle, etc., and the damaged area may be a scratch, a halo, etc.
[0082] Step S104, repairing each frame image based on the image partition label to obtain a repaired frame image data set;
[0083] In some embodiments, according to the guidance of the partition label file, differentiated repair strategies can be implemented for different areas to achieve targeted repair of local image problems and improve the overall visual effect of the image. For example, for static background areas, texture consistency and illumination correction are mainly used to repair scratches and halo problems; for dynamic target areas, attention is paid to the continuity of motion trajectories and boundary detail enhancement; for damaged areas, interpolation algorithms and boundary smoothing are used to process scratches, and brightness smoothing is combined to correct halos.
[0084] Step S105, performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain an optimized image sequence;
[0085] Among them, the focus of inter-frame dynamic sequence optimization is on the motion trajectory analysis of dynamic targets and the detailed reconstruction of blurred areas. The repaired frame images need to maintain the time continuity between frames and solve the problems of dynamic blur or frame jumping to ensure the smoothness of the sequence movements.
[0086] Step S106, performing global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration.
[0087] Among them, global consistency optimization ensures the consistency of brightness, tone and texture characteristics between frames, eliminating abrupt transitions or visual jumps, and fusion processing performs the final optimization of texture and color for the overall effect of the image.
[0088] Exemplarily, the global brightness and hue analysis module can be used to perform brightness and hue adjustments on inconsistent regions between frames. At the same time, a multi-scale fusion algorithm can be used to smooth the texture characteristics of the transition region at frame boundaries and scene switching.
[0089] In the above implementation, each frame of the image data is divided into multiple different areas, and a differentiated restoration strategy is designed based on the characteristics of each area. The technical path of combining frame-by-frame restoration and dynamic sequence optimization is adopted, which not only improves the quality of single-frame images, but also ensures the fluency and coherence of the image sequence. Through global consistency optimization and fusion processing, the final image data is finally generated. This application realizes the comprehensive restoration of old film and TV series images from single frames to sequences, restores their historical and artistic value, and greatly improves the commercialization and digital preservation value of images, providing strong technical support for the digital protection and reuse of cultural heritage.
[0090] Reference Figure 2 As an implementation method of step S103, based on the image features, each frame image is partitioned using a vertical classification model, and the steps of marking the image partition labels include:
[0091] Step S201, constructing a feature vector list of the frame image according to the image features of the frame image;
[0092] The feature vector list of the frame image is the result of the numerical description of the image, which is used to express the multi-dimensional characteristics of the pixels, including brightness, gradient, texture direction, etc. The feature vector list converts the two-dimensional image data into a list structure with multi-dimensional features by analyzing the image data pixel by pixel, providing a basis for subsequent classification and optimization.
[0093] Step S202, preliminarily classifying the feature vector list based on a clustering algorithm to obtain a preliminary image partition mask matrix;
[0094] Specifically, unsupervised learning can be performed on the feature vector list through clustering algorithms (such as K-Means or DBSCAN), and pixels can be divided into several categories based on feature similarity. For example, for images with strong structure, the K-Means algorithm can be used to divide them according to the Euclidean distance of pixel features; for noisy images or complex backgrounds, DBSCAN can be used to cluster feature vectors based on density.
[0095] In one embodiment of the present application, the preliminary image partition mask matrix is a storage form of the classification result, which represents the category of each pixel in the image in the form of a two-dimensional array. By mapping the classification result of each pixel to the corresponding mask matrix, each element value in the matrix represents the preliminary category of the pixel (such as "0" represents background, "1" represents dynamic target, and "2" represents damaged area).
[0096] Step S203, performing connectivity analysis according to the preliminary image partition mask matrix to extract each image region;
[0097] Among them, by detecting the category consistency of adjacent pixels in the mask matrix, continuous regions (i.e., connected regions or image regions) are extracted. Connectivity analysis is a key step in converting pixel-level data into region-level data.
[0098] In some embodiments, the pixel adjacency relationship (such as a 4-neighborhood or an 8-neighborhood) can be pre-defined, adjacent pixels of the same category can be merged, a label is generated for each connected area, its boundary, pixel set and area size are recorded, and isolated small areas with an area smaller than a preset threshold are removed; each area is stored as an independent data structure, including the category, boundary coordinates and pixel set.
[0099] Step S204, extracting image statistical features of each image area according to the feature vector list;
[0100] Among them, according to the pixel set of each connected region, the statistical characteristics of the region level are calculated based on the feature vector list, including brightness distribution, gradient intensity and texture direction consistency, so as to further characterize the regional characteristics.
[0101] Step S205, based on the pre-built vertical classification model, classification optimization is performed according to the image statistical features of each image region to obtain an optimized region classification mask matrix;
[0102] Among them, the vertical classification model is pre-built based on domain knowledge and classification rules. By comparing the similarity between regional characteristics and preset classification standards, the regional categories are optimized and adjusted to improve the accuracy of the partitioning results.
[0103] Specifically, the classification rules can be defined as follows: static background area: uniform brightness distribution, low gradient intensity; dynamic target area: high gradient intensity, strong texture direction consistency; damaged area: abnormal brightness and gradient changes, discontinuous texture distribution. In addition, the classification optimization step is to compare the feature statistics with the classification rules region by region, adjust the classification results of the region, and make inferences based on the spatial position and neighborhood characteristics for regions with unclear classification.
[0104] Step S206 , extracting the region category, boundary coordinates and image statistical features of each image region according to the region classification mask matrix, generating corresponding image partition labels and marking each image region respectively.
[0105] The category, boundary and statistical features of each image region are extracted from the optimized classification mask matrix to generate image partition labels for subsequent restoration.
[0106] Specifically, the edge detection algorithm can be used to obtain the polygonal boundary coordinates of each image area, and at the same time, the category, boundary coordinates and feature statistics are recorded for each image area to generate an image partition label file.
[0107] In the above implementation, a feature vector list of frame images is gradually constructed, a clustering algorithm is used to generate a preliminary image partition mask matrix, and the accuracy of the partition is gradually improved through connectivity analysis and vertical classification model optimization. Efficient data conversion and feature extraction are achieved between the pixel level and the region level, and the image partition label file finally generated records the category, boundary and characteristics of each region in detail, providing accurate data support for the subsequent restoration of image resources.
[0108] Reference Figure 3 As an implementation of step S104, the step of repairing the frame image based on the image partition label includes:
[0109] Step S301, reading the image partition label, extracting the region category, boundary coordinates and image statistical features of each image region of the frame image;
[0110] Among them, the image partition label file is loaded, the partition records are read one by one, and the area category (such as static background area, dynamic target area and damaged area), boundary coordinates and statistical features (brightness distribution, texture direction, etc.) of each image area are extracted.
[0111] Step S302, generating a corresponding restoration strategy according to the region category of each image region;
[0112] In some specific embodiments, for static background area repair, the repair strategy may include texture consistency repair (using a texture interpolation algorithm to fill scratches and maintain the continuity of regional texture) and lighting correction (using a brightness smoothing algorithm to balance the lighting distribution and eliminate halo or brightness mutation problems).
[0113] For dynamic target area restoration, the restoration strategy may include trajectory compensation (extracting the target motion trajectory based on consecutive frames and using trajectory interpolation to fill in motion jump points) and boundary detail enhancement (performing edge sharpening and contrast enhancement on boundary pixels to highlight target details).
[0114] For damaged area repair, it can include scratch filling (filling the scratch area using linear interpolation or texture synthesis algorithm) and halo correction (applying a multi-scale brightness smoothing strategy at the halo boundary to make the halo area transition naturally with the surrounding pixels).
[0115] Step S303, generating a repair task queue based on the repair strategy, and repairing each image area according to the repair task queue;
[0116] Specifically, an ordered restoration task queue is generated based on the information (category, boundary and features) of each extracted image region to ensure that restoration tasks of different types can be executed in sequence according to preset priorities or logical dependencies. The restoration task queue includes the regional label, restoration strategy and restoration priority of the restoration task. According to the restoration task queue, a targeted restoration strategy is implemented for each partition category to ensure that the restoration effect of each region is consistent with its characteristics.
[0117] It should be noted that the restoration task should design differentiated restoration strategies based on regional categories and statistical features to achieve fine processing of scratches, halos, dynamic target blur and other problems, and improve the local quality of the image.
[0118] Step S304 , stitching and fusing each restored image region based on the boundary coordinates, and smoothing the boundaries between adjacent image regions to obtain restored frame image data.
[0119] After completing the partition repair, each repaired area needs to be integrated into the frame image, and the boundaries of different areas need to be transitioned to ensure the visual consistency of the overall picture.
[0120] Specifically, according to the partition boundary coordinates, each restored partition pixel is replaced to the corresponding position of the frame image, and the pixels at the partition boundary are mixed to avoid the abruptness caused by the hard boundary. At the same time, the gradient smoothing algorithm is used to adjust the pixel gradient of the boundary area to eliminate the color or brightness mutation. For the boundary with discontinuous texture, the directional texture compensation algorithm can be used for transition optimization.
[0121] In the above implementation, the image partition labels are parsed, the regional categories, boundaries and feature information are extracted, and a repair task queue is generated. Differentiated repair strategies are implemented for different categories of regions, achieving accurate repair of local problems such as scratches, halos, and dynamic blur. On this basis, through regional stitching and boundary smoothing, the overall visual effect of the repaired frame image is ensured to be natural and the details are prominent, which significantly improves the quality and viewing experience of the image. The above technical solution is efficient and innovative in regional restoration and global visual fusion, and provides systematic technical support for the comprehensive restoration of old image resources.
[0122] Reference Figure 4 As an implementation of step S302, when the image area is a damaged area, the step of generating a corresponding repair strategy according to the damaged area includes:
[0123] Step S401, performing Gaussian pyramid decomposition on the damaged area of the frame image to generate a multi-scale image;
[0124] Among them, Gaussian pyramid decomposition is a multi-scale analysis method that generates a multi-scale image sequence from high resolution to low resolution by layering the image, which is used to extract damage characteristics at different scales. High-resolution images can detect fine damage, while low-resolution images help locate large-scale damage.
[0125] Specifically, starting from the original image, Gaussian filtering is performed on the image layer by layer to smooth the image, and the resolution of each layer is reduced by downsampling. By repeating the filtering and downsampling operations, a multi-layer image sequence with different resolutions is generated.
[0126] Step S402, detecting the scratch boundary of each scale in the multi-scale image based on the Sobel operator to obtain the scratch boundary position;
[0127] Among them, the scratch boundary usually appears as a significant gradient change area in the image. The Sobel operator can accurately locate the scratch boundary by calculating the size and direction of the pixel gradient, and comprehensively analyze the continuity and morphology of the scratch at different scales, laying the foundation for the scratch severity scoring.
[0128] Step S403, based on brightness anomaly analysis, identifying the halo region range in the multi-scale image;
[0129] Among them, the halo area usually appears as an area with abnormal brightness in the image, and the brightness of the core area is significantly higher than that of the surrounding area. The halo range can be effectively located through brightness anomaly analysis.
[0130] Specifically, pixels with brightness values significantly higher than the mean are marked as halo candidate pixels, and region growing operations are performed on the halo candidate pixels to mark the core area and boundary range, thereby effectively identifying the core area and affected range of the halo, providing precise location information for subsequent halo severity scoring and repair strategies.
[0131] Step S404, scoring the severity of the damage according to the scratch boundary position and the halo area range;
[0132] Among them, by quantitatively analyzing the morphological characteristics and spatial distribution of scratches and halos, the severity of the damage is evaluated to provide guidance for generating repair strategies.
[0133] Specifically, for scratch scoring, the length, width and total area of the scratch are integrated to calculate the mean and maximum values of the gradient intensity of the scratch boundary to quantify the significance of the scratch. For halo scoring, the area and average brightness value of the halo core area are counted to calculate the brightness gradient of the halo boundary area to evaluate its impact on the surrounding area. Finally, according to the preset scoring formula, the scoring results of scratches and halos are combined to generate the severity score of each damaged area.
[0134] Step S405, obtaining the scratch severity level and the halo severity level according to the damage severity scoring result;
[0135] In some embodiments, a scoring interval may be defined (eg, 0-3 points for mild, 4-6 points for moderate, and 7-10 points for severe), and scratches and halos may be divided into three levels: mild, moderate, and severe.
[0136] Step S406: Generate a repair strategy corresponding to the damaged area according to the scratch severity level and the halo severity level.
[0137] Among them, according to different severity levels, adaptive repair strategies are designed to achieve targeted treatment of mildly, moderately and severely damaged areas.
[0138] In one of the embodiments of the present application, the depth strategy for severe scratches includes: refining the scratch boundary through morphological operations (erosion and dilation) to ensure the continuity of the scratch position and boundary; sampling texture blocks on both sides of the scratch boundary, and synthesizing the texture within the scratch using the surrounding undamaged area based on the PatchMatch algorithm or a similar algorithm; performing global optimization to match and merge the texture direction of the repaired area with the texture direction of the surrounding area.
[0139] In another embodiment of the present application, the depth strategy for severe halo includes: executing a brightness stretching algorithm in the core highlight area of the halo to reduce the overexposed brightness value; for the halo transition area, using a brightness smoothing algorithm to adjust the brightness gradient to achieve brightness transition; based on the color distribution of adjacent undamaged areas, using a histogram matching algorithm to correct the color distortion of the halo area.
[0140] In the above implementation, the scratches and halos in the damaged area are accurately located, the severity is assessed, and a targeted repair solution is designed. The multi-scale analysis method ensures comprehensive coverage of detail damage and global damage, and the scoring and grading strategies provide intelligent repair guidance. Ultimately, this technical solution provides an innovative solution for the automation and efficiency of image restoration, greatly improving the accuracy and applicability of image resource restoration.
[0141] Reference Figure 5As an implementation method of step S105, the steps of performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain an optimized image sequence include:
[0142] Step S501, extracting image partition labels from the restored frame image data set, and identifying dynamic target areas in each restored frame image;
[0143] The image partition label file records the partition information in each frame, including static background, dynamic target area and damaged area. By extracting the information of the dynamic target area, the dynamic target area that needs to be optimized in each frame can be located, providing a basis for subsequent motion trajectory analysis and fuzzy area reconstruction.
[0144] Specifically, the dynamic target area label of each frame is extracted from the image partition label file, and the dynamic target mask matrix is generated according to the label. The pixel range of the dynamic target is recorded, the partition label of each frame image is traversed, the boundary position of the dynamic target area is located, and the texture and edge characteristics of the pixels in the dynamic target area are analyzed to confirm that the area characteristics are consistent with the label.
[0145] Step S502, based on the target tracking algorithm, extracting the motion trajectory of the dynamic target in the dynamic target area in the continuous frames and performing smoothing processing to obtain optimized motion trajectory information;
[0146] Among them, the motion trajectory of the dynamic target in the image sequence is the core data for solving the problems of inter-frame blur and jump. By extracting the trajectory information through the target tracking algorithm and performing smoothing, a continuous and stable motion trajectory can be obtained.
[0147] In some embodiments, an optical flow method (such as Lucas-Kanade optical flow) or a tracking algorithm based on feature points (such as SIFT, ORB) can be used to track the dynamic target area in continuous frames at the pixel level, extract the position, boundary and morphological changes of the dynamic target in each frame, and record them as a trajectory point sequence. Then, the extracted trajectory point sequence is subjected to trajectory smoothing, and Kalman filtering or polynomial fitting algorithm can be used to eliminate mutation points in the trajectory, and the smoothed motion trajectory information is output, including the center position, speed and direction of the dynamic target in each frame.
[0148] Step S503, analyzing the motion trajectory information to detect the dynamic blur area between consecutive frames;
[0149] Among them, the dynamic blur area is usually caused by the discontinuity of inter-frame information due to the rapid movement of the target or the shaking of the shooting equipment. Through the analysis of motion trajectory information and image characteristics, the position and range of the blurred area can be accurately detected.
[0150] Specifically, by analyzing the speed and direction changes in the motion trajectory file, marking the trajectory segments with sudden speed changes or inconsistent directions, and performing detection on the dynamic target areas corresponding to the trajectory segments, the scope of the blurred area can be preliminarily located; then, the gradient change value of the detected area is calculated, and the area where the gradient change significantly decreases is detected; then, the texture direction consistency of the area is analyzed, and the pixel set with blurred texture is identified. By combining the motion speed, gradient change and texture consistency results, the scope of the blurred area is comprehensively determined, and a regional characteristic file is generated for each blurred area, including the position, range and blur characteristic description.
[0151] Step S504, performing trajectory interpolation compensation on the dynamic blur area based on the motion trajectory information, reconstructing the texture of the dynamic blur area based on the texture synthesis algorithm, and adjusting the brightness and color values based on the surrounding unblurred area of the dynamic blur area to obtain a reconstructed dynamic blur area;
[0152] Among them, the detailed reconstruction of the blurred area requires comprehensive trajectory interpolation, texture synthesis and brightness correction techniques to restore the spatial and visual characteristics of the area and make the blurred area consistent with the surrounding unblurred areas.
[0153] In some embodiments, trajectory interpolation compensation uses the smoothed trajectory information to interpolate and estimate the theoretical position of pixels in the blurred area in the current frame, extracts pixel data of the unblurred area from adjacent frames, performs trajectory interpolation compensation, and generates preliminary reconstruction data. The texture reconstruction step includes: performing texture direction consistency analysis and synthesis on the blurred area based on the PatchMatch algorithm, and optimizing the texture direction distribution using the principal component analysis (PCA) method to ensure that the reconstructed texture is consistent with the surrounding area. The brightness and color adjustment step includes: smoothly adjusting the brightness of the reconstructed area to make it consistent with the lighting conditions of the surrounding unblurred areas, and then using the histogram matching algorithm to correct the hue of the reconstructed area so that its color distribution is consistent with the overall image.
[0154] Step S505, merging the reconstructed dynamic blur region into the restored frame image data set to obtain an optimized frame image data set;
[0155] Among them, according to the marking information of the dynamic blur area, the reconstructed blur area data is replaced with the corresponding frame image data, and the boundary of the merged area is transitionally processed to ensure the visual continuity of the area splicing.
[0156] Step S506 , arranging the frame image data set in time sequence to obtain an optimized image sequence.
[0157] Among them, the optimized frame image data set needs to be arranged into a continuous image sequence in chronological order to ensure the overall visual coherence of the sequence.
[0158] In the above implementation, the trajectory interpolation, texture synthesis and brightness correction technology are combined to effectively solve the problems of motion blur and visual inconsistency. The optimized image sequence finally generated not only has the motion continuity of dynamic targets, but also achieves an improvement in the overall visual quality, providing reliable technical support for dynamic image restoration and enhancement.
[0159] Reference Figure 6 As an implementation method of step S106, the steps of performing global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration include:
[0160] Step S601, extracting brightness characteristics of the optimized image sequence and performing brightness equalization processing;
[0161] Among them, inconsistent brightness is an important reason for the abrupt transition between frames of the image sequence. Therefore, by extracting the brightness characteristics and performing equalization processing, the consistency of the overall brightness distribution of the image sequence can be ensured.
[0162] Specifically, the brightness feature extraction step includes: traversing each frame of the image sequence, calculating the brightness histogram to extract the brightness mean and distribution range, and marking the frame image area with sudden brightness changes by comparing the brightness differences of consecutive frames. The brightness equalization processing step includes: performing linear interpolation on the brightness sudden change frames to calculate the target brightness value and adjust the brightness distribution; using Gaussian filtering to smooth the brightness change trend between frames to ensure that the brightness transition is natural from frame to frame.
[0163] Step S602, performing tone correction on the image sequence after brightness equalization processing based on principal component analysis, and performing multi-scale texture fusion on the boundary area of the frame image in the image sequence, updating the pixel data of the boundary area, and obtaining the image sequence after texture fusion;
[0164] Among them, the color difference between frames may lead to color incoordination of the image sequence. The principal component analysis is used to perform global color correction to ensure the overall color balance. At the same time, there may be texture discontinuity problems in the boundary area of the frame image. The multi-scale texture fusion technology can optimize the texture characteristics of the boundary area.
[0165] In some embodiments, the tone correction is to perform principal component analysis (PCA) on the RGB channels of each frame of the image, extract the main color distribution characteristics, and use color mapping technology (such as histogram matching) to adjust the tone of the frame to be consistent with the global color characteristics to eliminate local color deviations. The multi-scale texture fusion step includes: using Laplace pyramid decomposition to generate a multi-scale texture layer for the boundary area of the frame image, fusing the multi-scale texture layer based on the weighted average method to ensure a smooth transition of the direction and frequency of the texture in the boundary area, and updating the pixel data in the boundary area, thereby integrating the optimized texture data back into the image sequence.
[0166] Based on the above scheme, tone correction ensures the coordination of the overall color distribution of the image sequence, and multi-scale texture fusion solves the problem of texture abruptness at the frame image boundary and improves the texture continuity of the sequence.
[0167] Step S603, detecting the scene switching point in the texture fused image sequence based on the inter-frame difference method, and determining the regional characteristic difference of the switching point according to the frame images on both sides of the scene switching point;
[0168] Among them, scene switching points usually manifest as significant changes in content between frames. The switching points can be accurately detected through the inter-frame difference method, and the regional characteristic differences can be determined by analyzing the characteristics of the frame images on both sides of the switching point, providing a basis for transition frame generation.
[0169] Specifically, for scene switching point detection, the inter-frame difference method is used to calculate the pixel differences between consecutive frames, generate a difference matrix, and then perform threshold analysis on the difference matrix. When the difference value is significantly higher than the set threshold, the frame can be marked as a scene switching point. For regional characteristic difference analysis, the brightness histogram and texture direction distribution of the frame images on both sides of the scene switching point are extracted, and the differences in brightness, hue and texture characteristics are calculated to determine the corresponding switching point regional characteristic differences.
[0170] Step S604, generating a transition frame based on a texture synthesis algorithm according to the regional characteristic differences of the switching point and inserting it into the scene switching point to obtain an image sequence after dynamic fusion processing;
[0171] Among them, the transition processing of the scene switching point requires the generation of transition frames to alleviate visual abruptness. Through the texture synthesis algorithm, natural transition frames can be generated according to the regional characteristics of the frame images on both sides of the switching point and inserted into the switching point position.
[0172] Specifically, a texture synthesis algorithm is used to generate transition frames of the frame image areas on both sides of the switching point, and brightness smoothing is performed on the transition frames to ensure that the brightness is consistent with the frames on both sides of the switching point. The texture direction and details of the transition frames are adjusted based on the linear interpolation method to make them consistent with the characteristics of the frame images on both sides; then, the generated transition frames are inserted into the scene switching point position, the frame structure of the image sequence is updated, and gradient smoothing is performed on the boundaries between the transition frames and adjacent frames to eliminate visual discontinuities.
[0173] Step S605 , arranging the image sequence after the dynamic fusion processing in chronological order to obtain the final image data after restoration.
[0174] Among them, the image sequence that has undergone dynamic fusion processing needs to be rearranged in chronological order, and the global visual characteristics must be finally optimized to ensure the consistency of the image sequence in time and space dimensions.
[0175] In the above implementation, the consistency and coherence of the image sequence in brightness, hue and texture are achieved, the visual abruptness between frames is effectively eliminated, the texture smoothness of the boundary area is optimized, the fluency of scene switching is improved, and ultimately the restored image data with global visual coordination and high-quality presentation effects is generated, providing systematic and innovative technical support for film and television restoration and image enhancement.
[0176] The embodiment of the present application also discloses an image resource repair control system based on image processing.
[0177] An image resource repair control system based on image processing, the repair control system comprises:
[0178] A receiving module, used for receiving input image data;
[0179] An image processing module is used to pre-process multiple frames of image data and extract image features of each frame;
[0180] The image partitioning module is used to partition each frame image based on image features and use the vertical classification model to mark the image partition labels;
[0181] An image restoration module is used to restore each frame image based on the image partition label to obtain a restored frame image data set;
[0182] An image optimization module is used to optimize the inter-frame dynamic sequence of the restored frame image data set to obtain an optimized image sequence;
[0183] The final image data generation module is used to perform global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration.
[0184] An image resource repair control system based on image processing in an embodiment of the present application can implement any of the above-mentioned repair control methods, and the specific working process of each module in the repair control system can refer to the corresponding process in the above-mentioned method embodiment.
[0185] In the several embodiments provided in this application, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are only illustrative; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0186] The embodiment of the present application also discloses a computer device.
[0187] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, an image resource restoration control method based on image processing as described above is implemented.
[0188] The embodiment of the present application also discloses a computer-readable storage medium.
[0189] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the above-mentioned image resource restoration control methods based on image processing.
[0190] Among them, computer-readable storage media can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus or device; the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0191] It should be noted that in the above embodiments, the description of each embodiment has different emphases, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0192] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
Claims
1. A method for controlling image resource restoration based on image processing, characterized in that: The repair control method comprises: receiving input image data; Preprocessing the multiple frames of the image data respectively, and extracting image features of each frame of the image; Based on the image features, each frame image is partitioned using a vertical classification model, and image partition labels are marked; Repairing each of the frame images based on the image partition label to obtain a repaired frame image data set; Performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain an optimized image sequence; Perform global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration; Based on the image features, the steps of partitioning each frame image using a vertical classification model and marking image partition labels include: Constructing a feature vector list of the frame image according to the image features of the frame image; Preliminarily classifying the feature vector list based on a clustering algorithm to obtain a preliminary image partition mask matrix; Performing connectivity analysis according to the preliminary image partition mask matrix to extract each image region; Extracting image statistical features of each of the image regions according to the feature vector list; Based on the pre-built vertical classification model, classification optimization is performed according to the image statistical characteristics of each image area to obtain an optimized regional classification mask matrix; The region category, boundary coordinates and image statistical features of each image region are extracted according to the region classification mask matrix, the corresponding image partition label is generated and each image region is marked respectively.
2. The image resource restoration control method based on image processing according to claim 1, characterized in that: The region types of the image region include a static background region, a dynamic target region and a damaged region.
3. The image resource restoration control method based on image processing according to claim 2 is characterized in that: The step of repairing the frame image based on the image partition label includes: Read the image partition label, and extract the region category, boundary coordinates and image statistical features of each image region of the frame image; Generate a corresponding restoration strategy according to the region category of each image region; Generate a repair task queue based on the repair strategy, and repair each image area according to the repair task queue; Each restored image region is spliced and fused based on the boundary coordinates, and the boundaries between adjacent image regions are smoothed to obtain restored frame image data.
4. The image resource restoration control method based on image processing according to claim 3 is characterized in that: When the image area is a damaged area, the step of generating a corresponding repair strategy according to the damaged area includes: Performing Gaussian pyramid decomposition on the damaged area of the frame image to generate a multi-scale image; Detecting the scratch boundary of each scale in the multi-scale image based on the Sobel operator to obtain the scratch boundary position; Based on brightness anomaly analysis, identifying the halo region range in the multi-scale image; The severity of the injury is scored based on the scratch boundary location and the halo area range; According to the damage severity scoring results, the scratch severity level and halo severity level were obtained; A repair strategy corresponding to the damaged area is generated according to the scratch severity level and the halo severity level.
5. The image resource restoration control method based on image processing according to any one of claims 1 to 4, characterized in that: The steps of performing inter-frame dynamic sequence optimization on the restored frame image data set to obtain the optimized image sequence include: Extract image partition labels from the restored frame image data set, and identify the dynamic target area in each restored frame image; Based on the target tracking algorithm, the motion trajectory of the dynamic target in the dynamic target area in the continuous frames is extracted and smoothed to obtain optimized motion trajectory information; Analyze the motion trajectory information to detect the dynamic blur area between consecutive frames; Performing trajectory interpolation compensation on the dynamic blur area based on the motion trajectory information, reconstructing the texture of the dynamic blur area based on a texture synthesis algorithm, and adjusting the brightness and color values based on the surrounding unblurred area of the dynamic blur area to obtain a reconstructed dynamic blur area; Merging the reconstructed dynamic blur region into the restored frame image data set to obtain an optimized frame image data set; The frame image data set is arranged in time sequence to obtain an optimized image sequence.
6. The image resource restoration control method based on image processing according to claim 5 is characterized in that: The steps of performing global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration include: Extract the brightness characteristics of the optimized image sequence and perform brightness equalization processing; Based on principal component analysis, tone correction is performed on the image sequence after brightness equalization processing, and multi-scale texture fusion is performed on the boundary area of the frame image in the image sequence, and pixel data of the boundary area is updated to obtain the image sequence after texture fusion; Detecting the scene switching point in the texture-fused image sequence based on an inter-frame difference method, and determining the regional characteristic difference of the switching point according to the frame images on both sides of the scene switching point; According to the regional characteristic differences of the switching points, a transition frame is generated based on a texture synthesis algorithm and inserted into the scene switching points to obtain an image sequence after dynamic fusion processing; The image sequence after the dynamic fusion processing is arranged in chronological order to obtain the final image data after restoration.
7. An image resource restoration control system based on image processing, characterized in that: The repair control system comprises: A receiving module, used for receiving input image data; An image processing module, used to pre-process the multiple frames of the image data respectively and extract image features of each frame of the image; An image partitioning module, used to partition each frame image based on the image features using a vertical classification model, and mark image partition labels; An image restoration module, used to restore each of the frame images based on the image partition label to obtain a restored frame image data set; An image optimization module is used to optimize the inter-frame dynamic sequence of the restored frame image data set to obtain an optimized image sequence; The final image data generation module is used to perform global consistency optimization and dynamic fusion processing on the optimized image sequence to obtain the final image data after restoration; The image partitioning module is configured as follows: Constructing a feature vector list of the frame image according to the image features of the frame image; Preliminarily classifying the feature vector list based on a clustering algorithm to obtain a preliminary image partition mask matrix; Performing connectivity analysis according to the preliminary image partition mask matrix to extract each image region; Extracting image statistical features of each of the image regions according to the feature vector list; Based on the pre-built vertical classification model, classification optimization is performed according to the image statistical characteristics of each image area to obtain an optimized regional classification mask matrix; The region category, boundary coordinates and image statistical features of each image region are extracted according to the region classification mask matrix, the corresponding image partition label is generated and each image region is marked respectively.
8. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image restoration method and device, equipment and storage medium
CN118469871A
Video stitching method and system for multi-camera monitoring
CN118678240A
Video stream acquisition method based on deep learning
CN119299703A