A Deep Learning-Based Method and System for Archival Image Distortion Correction
By combining the physical properties and visual feature points of archival images, and using deep learning networks to separate and fuse deformation components, the problems of insufficient accuracy and structural damage in archival image distortion correction are solved, achieving high-precision image correction and content fidelity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING LANGRAN HUIXIANG TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies are insufficient in accuracy and may damage the original document content structure when correcting distortions in archival images under complex physical backgrounds.
By acquiring the carrier attribute information and deformation constraints of the archival image, feature points of the document content are extracted, and a correlation mapping relationship between the physical deformation of the carrier and the visual appearance of the content is established. A deep learning network is used to separate and fuse the deformation components to generate overall and local correction mappings.
It improves the accuracy of correcting geometric distortions caused by complex physical factors, preserves the structural integrity of important content such as text lines and seals, and achieves a balance between image flattening and the realism of local details.
Smart Images

Figure CN122134598A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of image processing and computer vision technology, and in particular to a method and system for correcting archival image distortion based on deep learning. Background Technology
[0002] With the increasing demand for the digital preservation and utilization of historical archives, high-precision correction of complex geometric distortions caused by physical carrier curling, binding compression, etc., has become a key technical requirement for improving the quality and readability of digital archival images.
[0003] Currently, the technical solution adopted is to use an end-to-end deep learning network model. This solution trains a convolutional neural network to directly learn the pixel-level mapping relationship between the distorted archival image and the corrected image in order to predict the global deformation field and complete the correction.
[0004] However, when this method is applied, the training and inference process of its network model usually does not fully combine the inherent relationship between the physical properties of the archive carrier and the unique structural features of the document content. This leads to the correction process relying too much on the appearance features of the image when facing complex distortions caused by the coupling of multiple factors, resulting in inaccurate correction results in terms of physical deformation laws, or causing undesirable distortions to the key structures of the document content. Summary of the Invention
[0005] This application provides a deep learning-based method and system for correcting archival image distortion, which addresses the problems in existing technologies where the correction of archival images with complex physical backgrounds is not accurate enough and may damage the original document content structure.
[0006] Firstly, this application provides a deep learning-based method for correcting archival image distortion, comprising: Obtain the initial archival image to be corrected and the carrier attribute information corresponding to the initial archival image, as well as the deformation constraints of the physical carrier of the archive; Multiple feature points are extracted from the document content from the initial archive image. These feature points include text baseline points, seal outline points, binding hole points, and specific stain points. By coupling the deformation constraints with the spatial distribution of the feature points, an association mapping relationship is obtained. This association mapping relationship is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content. Using a pre-trained deep learning network, the first deformation component and the second deformation component are determined from the archive image according to the association mapping relationship, so as to obtain the first correction mapping and the second correction mapping; By fusing the first correction mapping and the second correction mapping, a geometric transformation is performed on the archive image to obtain a corrected target archive image.
[0007] Optionally, the initial archival image to be corrected and the carrier attribute information corresponding to the initial archival image, as well as the deformation constraints of the archival physical carrier, are obtained, including: Initial archival images are acquired using a scanning device; Obtain the carrier attribute information associated with the initial archival image. The carrier attribute information includes the material category of the physical carrier of the archive, the position coordinates of the binding line on the physical carrier of the archive, and the historical restoration area marker of the physical carrier of the archive. Based on the material category, the elastic and plastic parameters corresponding to the material category are matched from a preset material parameter library; Using the position coordinates of the binding line on the physical carrier of the archive as the constraint boundary, and in conjunction with the historical restoration area marker, the fixed constraint area of the physical carrier of the archive at the position coordinates of the binding line and the locally hardened constraint area at the historical restoration area marker are determined. Based on the elastic parameters, the plastic parameters, the fixed constraint region, and the locally hardened constraint region, a stress deformation simulation model of the physical carrier of the archive is constructed. The deformation output of the stress deformation simulation model under typical environmental parameters is quantified into a trend description of the displacement direction of pixels in the archive image, and the trend description is used as a deformation constraint condition.
[0008] Optionally, multiple feature points are extracted from the document content from the initial archival image. These feature points include text baseline points, stamp outline points, binding hole points, and specific stain points, including: The initial archive image is converted into a binary image, and multiple independent connected regions are identified in the binary image; From the multiple independent connected regions, based on the geometric properties and arrangement rules of the connected regions, the text connected regions that constitute the text line are selected, and the text baseline point is determined based on the position of the text connected regions. In the binary image, regions that meet the first preset conditions are identified as candidate regions for the seal, and the outer contour points of the candidate regions for the seal are extracted as seal contour points. Circular abnormal regions are detected in the edge area of the initial archive image, and the binding hole point is located from the abnormal region by combining the binding line position coordinates in the carrier attribute information. Color analysis is performed on the initial archive image to separate color abnormal regions, and based on the shape and color features of the color abnormal regions, the boundary contour points of the color abnormal regions are extracted as specific stain points.
[0009] Optionally, the deformation constraints are coupled with the spatial distribution of the feature points to obtain an association mapping relationship. This association mapping relationship is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content, including: The pixel displacement direction trend described in the deformation constraint condition is transformed into a directional constraint field applied to the image plane of the initial file. Using the text baseline point, the seal outline point, the binding hole point, and the specific stain point as control points, an initial triangular mesh is established on the initial file image; The directional constraint field is applied to each vertex of the initial triangular mesh, such that the movable direction of each vertex is restricted to the trend direction specified by the directional constraint field. Under the constraints of the directional constraint field, the positions of all vertices in the initial triangular mesh are adjusted according to the first geometric rule that the text baseline points should remain parallel, the second geometric rule that the stamp outline points should remain closed, and the third geometric rule that the binding hole points should be distributed along a straight line. After the adjustment is completed, the coordinate changes of the vertices of the initial triangular mesh before and after the position adjustment are recorded to obtain the associated mapping relationship.
[0010] Optionally, using a pre-trained deep learning network, based on the association mapping relationship, a first deformation component and a second deformation component are determined from the archive image to obtain a first correction mapping and a second correction mapping, including: The initial file image is concatenated with the associated mapping relationship to form combined input data, and the combined input data is then input into a pre-trained deep learning network. The first processing stage of the deep learning network extracts image features of the initial archive image at different resolutions. In the second processing stage of the deep learning network, the image features at different resolutions are analyzed according to the correlation mapping relationship. Features that are consistent with the overall trend of the correlation mapping relationship are separated from the image features as first deformation features, and local features that are inconsistent with the overall trend of the correlation mapping relationship are separated as second deformation features. The first deformation feature is input into the third processing stage of the deep learning network to generate a first displacement field, which is used as a first correction mapping. The second deformation feature is input into the fourth processing stage of the deep learning network to generate a second displacement field, which is used as a second correction mapping.
[0011] Optionally, the first deformation feature is input into the third processing stage of the deep learning network to generate a first displacement field, which is used as a first correction mapping. The second deformation feature is then input into the fourth processing stage of the deep learning network to generate a second displacement field, which is used as a second correction mapping. This includes: The first deformation feature is input into the third processing stage of the deep learning network, and multi-level sampling operations are performed on the first deformation feature. After each upsampling operation, the first deformation feature at the current scale is merged with the image features at the corresponding scale extracted from the first processing stage. After completing the upsampling and feature merging operations at all levels, the resulting resolution feature map is input into a transformation layer to predict a two-dimensional displacement vector for each pixel in the initial archive image. The two-dimensional displacement vectors predicted from all pixels are integrated to form a first displacement field, and the first displacement field is used as the first correction mapping. The second deformation feature is input into the fourth processing stage to analyze the second deformation feature and identify local areas in the initial archive image that meet the second preset conditions. Based on the second deformation feature corresponding to the local region, a displacement field segment is generated; Combine all the displacement field segments corresponding to the local regions to form a second displacement field, and use the second displacement field as a second correction mapping.
[0012] Optionally, the first correction map and the second correction map are fused, and a geometric transformation is performed on the archive image to obtain a corrected target archive image, including: The first displacement field defined by the first correction mapping and the second displacement field defined by the second correction mapping are superimposed to obtain the target displacement field. In the image region where the first displacement field and the second displacement field coexist, the displacement vectors of the first displacement field and the second displacement field are weighted and summed. Based on the target displacement field, calculate a target coordinate position for each pixel in the initial archive image; According to the target coordinate position of the pixel, the pixel color value is resampled in the initial archive image, and all the resampled pixel color values are arranged according to the target coordinate position to form the corrected target archive image.
[0013] Secondly, this application provides a deep learning-based archival image distortion correction system, comprising: The acquisition module is used to acquire the initial archive image to be corrected, the carrier attribute information corresponding to the initial archive image, and the deformation constraint conditions of the physical carrier of the archive. The extraction module is used to extract multiple feature points from the document content from the initial archive image. The feature points include text baseline points, seal outline points, binding hole points, and specific stain points. The coupling module is used to couple the deformation constraints with the spatial distribution of the feature points to obtain an association mapping relationship, which is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content. The determination module is used to use a pre-trained deep learning network to determine the first deformation component and the second deformation component from the archive image according to the association mapping relationship, so as to obtain the first correction mapping and the second correction mapping. The fusion module is used to fuse the first correction mapping and the second correction mapping, and perform geometric transformation on the archive image to obtain the corrected target archive image.
[0014] Thirdly, this application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a deep learning-based archival image distortion correction method as described in the first aspect above.
[0015] Fourthly, this application provides a computer storage medium storing a computer program, which, when executed by a computer, implements a deep learning-based method for correcting archival image distortion as described in the first aspect.
[0016] The beneficial effects of this application are: This application introduces the physical properties of the archival carrier and derives deformation constraints accordingly. Simultaneously, it extracts feature points with specific semantic and structural meanings from the document content, coupling the laws of physical deformation with the structural priors of visual content. This establishes a correlation mapping relationship that reflects the essence of archival image distortion, enabling the subsequent correction process to not only rely on the image's appearance information but also be guided by both the physical deformation laws of the carrier and the original layout structure of the document. This fundamentally improves the accuracy of correcting geometric distortions caused by complex physical reasons and effectively avoids unintentional damage to important content structures such as text lines and seals.
[0017] Furthermore, by utilizing deep learning networks and guided by correlation mapping relationships, the first deformation component and the second deformation component, representing different distortion components, are separated from the image. Based on this, a global first correction mapping and a local second correction mapping are generated. By fusing these two correction mappings, which correspond to different physical mechanisms, it is possible to collaboratively handle complex distortions such as overall curvature, wrinkles, and local damage and adhesion that are widespread in archival images. This separation and fusion correction strategy allows for precise matching between the correction of overall smooth deformation and the correction of complex local distortions. Ultimately, while achieving overall image flattening, it better preserves the authenticity of local details, thus achieving a better balance between physical rationality and visual fidelity.
[0018] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart of a deep learning-based archival image distortion correction method provided in this application is shown; Figure 2 A schematic diagram of the structure of a deep learning-based archival image distortion correction system provided in this application is shown. Figure 3 A schematic diagram of the structure of a computing device provided in this application is shown. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present application, the technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0022] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.
[0023] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] Figure 1 A flowchart of a deep learning-based archival image distortion correction method is provided for this application, as shown below. Figure 1 As shown, the method includes: Step 101: Obtain the initial archive image to be corrected, the carrier attribute information corresponding to the initial archive image, and the deformation constraints of the physical carrier of the archive.
[0025] Optionally, step 101 may specifically include: Step 1011: Acquire initial archive images using a scanning device.
[0026] Step 1012: Obtain the carrier attribute information associated with the initial archive image. The carrier attribute information includes the material type of the physical carrier of the archive, the position coordinates of the binding thread on the physical carrier of the archive, and the historical restoration area marker of the physical carrier of the archive.
[0027] Step 1013: Based on the material category, match the elastic and plastic parameters corresponding to the material category from the preset material parameter library.
[0028] Step 1014: Using the position coordinates of the binding line on the physical carrier of the archive as the constraint boundary, and in conjunction with the historical restoration area marker, determine the fixed constraint area of the physical carrier of the archive at the position coordinates of the binding line and the locally hardened constraint area at the historical restoration area marker.
[0029] Step 1015: Based on the elastic parameters, the plastic parameters, the fixed constraint region, and the locally hardened constraint region, construct a stress deformation simulation model of the physical carrier of the archive.
[0030] Step 1016: Quantify the deformation output of the stress deformation simulation model under typical environmental parameters into a trend description of the displacement direction of pixels in the archive image, and use the trend description as a deformation constraint condition.
[0031] In this step, the initial archival image refers to the original digital image obtained after digitizing the original physical archives such as paper and silk using a scanning device. It usually contains geometric distortions caused by the deformation of the carrier and is used as input data for subsequent image correction processing. It is obtained by scanning.
[0032] Carrier attribute information refers to digital information describing the inherent physical state and history of the physical carrier of the archive. It is used to provide a basis for analyzing the deformation pattern of the carrier and is obtained through manual input or querying related databases.
[0033] The physical carrier of archives refers to the physical medium itself that carries the content of the archives, such as paper, parchment, bamboo slips, etc. It is the physical source of geometric distortion in the image and is indirectly related through the initial archival image.
[0034] Deformation constraints refer to a trend description of the direction of pixel position changes in an archival image, used to physically constrain and guide the subsequent image deformation correction process.
[0035] Material category refers to the textual identifier of the type of physical carrier material of the archive. It is used to associate and query the physical and mechanical parameters of the material and is obtained by parsing the carrier attribute information.
[0036] Location coordinates refer to two-dimensional values within the planar space of the physical carrier of the archive, used to accurately locate a specific point such as the binding line. They are used to define the boundary conditions in deformation simulation and are obtained through parsing the carrier attribute information.
[0037] Historical restoration area marking refers to the digital marking used to identify areas on the physical carrier of archives that have undergone repair, reinforcement, or other treatments, and is used to account for changes in the mechanical properties of the area in deformation analysis.
[0038] The preset material parameter library refers to a pre-established database that stores the correspondence between various common archival carrier materials and their key physical and mechanical parameters. It is used to query the corresponding mechanical parameters according to the material category. In this application, it is represented as a digital database or data table.
[0039] Elastic parameters and plastic parameters: Elastic parameters are numerical values that describe the degree or relationship of a material returning to its original shape after being deformed under stress and the external force is removed; plastic parameters are numerical values that describe the degree or relationship of a material undergoing irreversible permanent deformation after being subjected to stress exceeding a certain limit. Both are used together to construct the constitutive model of the material to simulate its deformation behavior.
[0040] Constraint boundaries refer to the spatial positional conditions in a mechanical model used to restrict the displacement or rotation of a certain part of the model. They are used to simulate the fixed or restricted parts of a physical carrier and are obtained through position coordinate calculation or transformation.
[0041] A fixed constraint region refers to a spatial region in a mechanical model that is completely restricted from displacement and rotation in all directions. It is used to simulate the state where the binding line of an archive is completely fixed and is defined based on constraint boundaries.
[0042] Locally hardened constrained regions refer to specific spatial regions in mechanical models where the material stiffness is set to resist deformation at a higher level than the surrounding areas. These regions are used to simulate the characteristics of historically repaired areas becoming harder due to reinforcement treatment.
[0043] A stress-deformation simulation model is a digital model built in a computer to simulate the deformation of a physical archival carrier under specific environmental factors, and is used to predict the possible deformation patterns of the carrier.
[0044] Deformation output refers to the displacement data of each point in the model calculated after the stress deformation simulation model runs under given environmental parameters. It is used to describe the deformation results of the carrier under simulation conditions.
[0045] Trend description refers to a qualitative or semi-quantitative statement about the main direction and pattern of deformation formed by summarizing and abstracting deformation output data. It is used to transform complex mechanical simulation results into guidance information that can be used for image correction.
[0046] In this step, the physical archive is first imaged using a specialized scanning device such as a high-resolution flatbed scanner or a non-contact book scanner to obtain an initial image containing the original distortions. Next, database query technology is used to match and search within a digital archive management system using the unique identifier automatically or manually associated with the image during acquisition. This retrieves the carrier attribute information associated with the archive, including its material type, binding line coordinates, and historical restoration area markings. Then, a pre-defined relational material parameter database is queried, using the obtained material type string as the query keyword. A precise match is performed in the relational material parameter database to obtain the elastic and plastic parameters stored in numerical form corresponding to that material type. Then, the obtained binding line position coordinate data is imported through the preprocessing module of computer graphics processing technology or finite element analysis software. In the two-dimensional plane coordinate system corresponding to the initial archive image, a strip area is delineated based on the line connecting these two-dimensional plane coordinate points. Then, the software function sets this area as a fixed constraint area. At the same time, the polygon coordinate data marked by the historical repair area is imported into the same plane, the corresponding area is delineated, and the attribute parameters of the unit or mesh in the historical repair area are modified to set it as a locally hardened constraint area. Subsequently, by calling the modeling and solving functions of the finite element analysis software, a new material model is defined using the obtained elastic and plastic parameters. Then, a thin shell or membrane structure model corresponding to the planar dimensions of the archive is created in the finite element analysis software. Finally, the defined fixed constraint region and local hardening constraint region are applied to the structure as boundary conditions of the new material model, thereby completing the construction of a digital stress deformation simulation model that can simulate the stress deformation of the specific archive carrier. Finally, in the constructed stress-deformation simulation model, typical temperature and humidity changes are set as load conditions, and a finite element solver is run to calculate and obtain the displacement data of each node of the model, i.e., the deformation output. Then, through data post-processing techniques, such as statistical analysis or principal component analysis of the full-field displacement vector, these discrete node displacement data are summarized and refined into a trend description of the overall deformation direction of the image, thereby obtaining the final deformation constraint conditions.
[0047] For example, in Archive A's plan to digitize a Qing Dynasty book, the process begins by using a non-contact book scanner to photograph the book and obtain an initial archival image. Next, the system automatically retrieves the carrier attribute information from the archive management database based on the image's associated archive number. This includes the material type (handmade Xuan paper), the coordinates of the binding line on the left side of the image, and a historical restoration area marked as a "slip-edge repair" in the lower right corner of the book. Then, based on the "handmade Xuan paper" category, the system queries a pre-defined material parameter library to match the corresponding elastic parameters such as the elastic modulus and Poisson's ratio, and the plastic parameters such as the yield strength. Finally, using the binding line coordinate sequence, a fixed constraint area is defined and set on the left side of the corresponding two-dimensional plane of the image. Simultaneously, a local hardening constraint region was defined and set in the lower right corner corresponding to the historical restoration mark. Then, using the mechanical parameters of Xuan paper and loading two constraint region conditions, a digital stress deformation simulation model was constructed to simulate the deformation of the ancient book carrier through the finite element analysis module. Finally, typical temperature and humidity change environmental parameters were set for the digital stress deformation simulation model and the calculation was run to obtain the deformation displacement data of each point on the paper. Then, the trend description of the overall image bending from the lower left to the upper right and the deformation degree of the lower right restoration area being relatively weak was analyzed and extracted, and this was used as the final deformation constraint condition.
[0048] This step systematically acquires digital images of archives and information about their physical carriers, and based on this information, constructs a physical deformation simulation model from the perspective of materials mechanics, thereby deriving the physical laws behind image distortion. This process closely integrates the digital images of archives with the physical properties of their physical carriers, so that the understanding of image distortion is no longer limited to visual appearance, but has a solid physical mechanism to support it.
[0049] Step 102: Extract multiple feature points from the document content from the initial archive image. The feature points include text baseline points, seal outline points, binding hole points, and specific stain points.
[0050] Optionally, step 102 may specifically include: Step 1021: Convert the initial archive image into a binary image and identify multiple independent connected regions in the binary image.
[0051] Step 1022: From the multiple independent connected regions, based on the geometric properties and arrangement rules of the connected regions, filter out the text connected regions that constitute the text line, and determine the text baseline point based on the position of the text connected regions.
[0052] Step 1023: Identify regions in the binary image that meet the first preset conditions as candidate regions for the seal, and extract the outer contour points of the candidate regions for the seal as seal contour points.
[0053] Step 1024: Detect circular abnormal regions in the edge area of the initial archive image, and locate the binding hole point from the abnormal region by combining the binding line position coordinates in the carrier attribute information.
[0054] Step 1025: Perform color analysis on the initial archive image to separate color abnormal areas, and extract the boundary contour points of the color abnormal areas as specific stain points based on the shape and color features of the color abnormal areas.
[0055] In this step, feature points refer to key location points that are representative and structurally significant extracted from the content of the archival image document, which are used to provide spatial location basis for subsequent deformation analysis and correction mapping.
[0056] The text baseline point refers to the point located at the center reference position of the text line in the vertical direction, used to characterize the horizontal alignment baseline that the text line should have.
[0057] Seal outline points refer to a series of key points that form the outer shape outline of the seal, used to constrain and maintain the geometric consistency of the seal shape during the correction process.
[0058] The binding hole point refers to the center point of the circular feature formed by the perforation on the physical carrier of the archive due to binding needs. It is used to associate the binding position of the physical carrier with the image content.
[0059] Specific stain points refer to the boundary contour points of stain areas formed by historical reasons and possessing stable shape characteristics, used to provide structural references for additional, non-artificial content.
[0060] Binary images are simplified images containing only pure black and pure white pixel values. They are used to highlight the contrast between document content and background, facilitating region segmentation and analysis. They are obtained by thresholding the initial archive image.
[0061] A text-connected region refers to an independent block in a binary image consisting of all connected black pixels. It typically corresponds to a character, punctuation mark, or stroke and is used to identify and locate text content in a document. It is obtained through connected component analysis algorithms.
[0062] Geometric properties and arrangement rules: Geometric properties refer to parameters that describe the shape, size, orientation, and other characteristics of connected regions; arrangement rules refer to the patterns in the spatial distribution of these regions, such as alignment in the horizontal or vertical direction. Both serve as filtering criteria to identify organized lines of text from numerous regions, and are obtained by analyzing the characteristics of connected regions and their spatial distribution relationships.
[0063] The first preset condition refers to a set of screening criteria used to determine whether a connected region may be a seal, and is used to initially define the possible image range of the seal. In this article, it refers to having a closed loop structure or a specific color range.
[0064] The candidate region for the seal refers to the connected regions that meet the first preset conditions and are initially determined to be suspected seals. It is used as the basis for further extraction of the precise contour and is obtained by conditionally filtering all connected regions in the binary image.
[0065] Circular abnormal regions refer to areas detected at the edge of an image that are nearly circular in shape and have a significant difference in color or brightness from the background. These regions are used to initially locate possible binding holes and are obtained through a circular detection algorithm.
[0066] Color anomaly regions refer to the set of pixels in the color space that are significantly different from both the document background color and the normal text color. They are used to separate out possible historical traces such as stains, water stains, or mold. They are obtained through color space conversion and threshold segmentation techniques.
[0067] In this step, the initial file image is first binarized using threshold segmentation in image processing, converting the color or grayscale image into a binary image containing only black and white. Then, a connected component analysis algorithm is used to scan and mark all connected black pixel blocks in the resulting binary image, thereby identifying multiple independent connected regions. Next, the geometric properties of each connected region are calculated, such as the height, width, and area of the bounding rectangle, and the horizontal density and alignment of these connected regions are analyzed. From all the independent connected regions, regions of similar size and neatly arranged on the horizontal line are selected and identified as text connected regions that constitute text lines. Then, for each selected text connected region, the center line of its minimum bounding rectangle in the vertical direction is calculated, and the coordinates of the midpoint of the center line in the horizontal direction are recorded as a text baseline point. Next, in the obtained binary image, by setting the first preset conditions regarding the area range, the circularity of the shape, and whether the contour is a closed curve, all connected regions are traversed and filtered. Regions that simultaneously meet these shape and structural features are identified as candidate regions for the seal. Then, through the contour extraction algorithm, the outermost closed boundary of each candidate region for the seal is extracted, and the coordinates of a series of points are sampled at fixed angular intervals on the outermost closed boundary contour. The coordinates of these sampled points are used as the seal contour points. Then, in the four edge regions of the initial archival image, all abnormal regions with approximately circular shapes are detected in the image through Hough circle transform or similar circle detection algorithms. After that, combined with the binding line position coordinates obtained from the carrier attribute information, the shortest distance from the center point of each detected circular abnormal region to the binding line coordinates is calculated, and those regions whose positions best match the binding line coordinates and are roughly in a straight line are selected from all circular abnormal regions. The center point coordinates of these regions are extracted and recorded as binding hole points. Finally, the initial archive image undergoes a color space conversion operation, such as converting it from the RGB color space to the HSV or Lab color space, which are more suitable for color analysis. Then, by setting threshold ranges for specific color components, such as saturation (S) and lightness (V), threshold segmentation is performed in the converted color space to separate pixel sets that are significantly different from the white background and black ink blots. These pixel sets form color aberration regions. Subsequently, noise is removed by morphological opening and closing operations. By analyzing the shape features of the regions, such as area and concavity, regions with irregular shapes, clear boundaries, and stable colors within a preset range are selected from all color aberration regions and identified as specific stain regions. Finally, a contour extraction algorithm is used to extract the boundary contours of these specific stain regions, and the coordinates of a series of points are sampled on the contour at fixed step intervals. The coordinates of these sampled points are recorded as specific stain points.
[0068] For example, following the specific implementation of the previous step, feature extraction is performed on the acquired initial archival image of the Qing Dynasty ancient book. First, the initial archival image is binarized using image processing software, converting the light yellow background of the Xuan paper to white and the ink to black, resulting in a clear black-and-white binary image. Thousands of independent black ink blocks, i.e., connected regions, are then identified in the initial archival image. Next, these connected regions are analyzed. Based on the rule that their height and width are similar and they are neatly arranged vertically, the text connected regions constituting the columns of vertical text in the ancient book are selected. The vertical center line of each column of text is calculated, and the coordinates of the midpoint of this vertical center line are recorded as multiple text baseline points. The method involves searching for large, nearly square closed regions in the binary image, identifying the square cinnabar seal area at the end of the ancient book as a candidate seal area, and extracting multiple equally spaced points on its outer frame as seal outline points. Then, a circular pattern is detected near the left edge of the image, and combined with the known binding line coordinates, three circular light-transmitting points aligned with the vertical coordinates of the binding line are located, and their center coordinates are extracted as binding hole points. Finally, the image color is analyzed, and a reddish-brown area in the lower right corner that is different from both the paper color and the ink color is separated out. This area is identified as a specific stain area formed by historical tea spills, and multiple equally spaced points on its irregular boundary are extracted as specific stain points.
[0069] This step, through a systematic image processing workflow, accurately locates the structural feature points of key content such as text, seals, binding holes, and historical stains from the archival image. These feature points together constitute the skeleton and markings of the document content, reflecting not only the visual layout of the archive, but also the inherent and highly reliable reference standards for judging whether the image has been distorted, based on the geometric rules that the archive should possess, such as straight text lines, closed seals, and aligned binding holes.
[0070] Step 103: Couple the deformation constraint conditions with the spatial distribution of the feature points to obtain the association mapping relationship. The association mapping relationship is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content.
[0071] Optionally, step 103 may specifically include: Step 1031: The pixel displacement direction trend described in the deformation constraint condition is converted into a direction constraint field applied to the image plane of the initial file.
[0072] Step 1032: Using the text baseline point, the seal outline point, the binding hole point, and the specific stain point as control points, establish an initial triangular mesh on the initial file image.
[0073] Step 1033: Apply the directional constraint field to each vertex of the initial triangular mesh, such that the movable direction of each vertex is restricted to the trend direction specified by the directional constraint field.
[0074] Step 1034: Under the constraints of the direction constraint field, the positions of all vertices in the initial triangular mesh are adjusted according to the first geometric rule that the text baseline points should remain parallel, the second geometric rule that the stamp outline points should remain in a closed shape, and the third geometric rule that the binding hole points should be distributed along a straight line.
[0075] Step 1035: After the adjustment is completed, record the coordinate changes of the vertices of the initial triangular mesh before and after the position adjustment to obtain the associated mapping relationship.
[0076] In this step, the association mapping relationship refers to a mathematical relationship that describes how the position of pixels in the archive image should change under the influence of physical deformation of the carrier. It is used to associate the deformation law at the physical level with the feature point position of the visual content, and serves as the direct input for deformation decomposition of the subsequent deep learning network.
[0077] Content visual appearance refers to the visual form of specific content such as text, seals, holes, and stains presented in archival images, and is the final manifestation of the deformation of the physical carrier on the image.
[0078] The pixel displacement direction trend refers to a holistic and generalized description of the possible movement direction of most pixels in an image due to the physical deformation of the carrier. It is used to guide the correction direction of image deformation from a macroscopic perspective and is obtained by analyzing deformation constraints.
[0079] An orientation constraint field is a vector field that covers the entire image plane and defines the direction in which each pixel or grid vertex is allowed to move. It is used to transform macroscopic deformation trends into spatial constraints that can be applied to each specific location point. It is obtained by mathematically modeling and spatially interpolating the displacement direction trends of pixels.
[0080] An initial triangular mesh refers to a mesh structure consisting of countless triangles that divides the entire image plane into nodes using a series of feature points. This mesh is used to establish a continuous geometric representation of the image plane and serves as a carrier for deformation adjustment.
[0081] The trend direction range refers to an angular interval defined for each vertex in the direction constraint field, which allows it to move. It is used to quantify the degree of freedom when adjusting the position of each vertex and to avoid adjusting the direction from violating the laws of physics.
[0082] The first geometric rule refers to the rule that requires all text baseline points to maintain a parallel spatial relationship after adjustment. It is used to maintain the regularity of text lines in deformation correction and is defined by preset parallelism constraints.
[0083] The second geometric rule refers to the spatial positional relationship rule that requires all the seal outline points that make up the same seal to maintain a closed polygon shape after adjustment. It is used to maintain the integrity of the seal shape during deformation correction and is defined by preset closed shape constraints.
[0084] The third geometric rule refers to the spatial positional relationship rule that requires all binding hole points to be roughly distributed along a straight line after adjustment. It is used to maintain the spatial alignment of binding holes during deformation correction and is defined by preset collinearity constraint conditions.
[0085] In this step, firstly, the pixel displacement direction trend described in the deformation constraint condition is mathematically modeled and spatially expressed by vector field modeling and spatial interpolation techniques. This pixel displacement direction trend is transformed into a well-defined two-dimensional principal direction vector covering the entire initial file image plane. Then, by using the radial basis function interpolation algorithm, guided by this principal direction, the position of each pixel on the image plane is calculated and assigned a unit vector representing its allowed movement direction, thereby generating a direction constraint field that continuously covers the entire image area. Secondly, using the Delaunay triangulation algorithm in computer graphics, all extracted text baseline points, seal outline points, binding hole points, and specific stain points are processed as a set of input control points. These discrete control points are automatically connected to divide the rectangular area containing the entire initial archival image into a mesh structure composed of a large number of non-overlapping triangles, i.e., the initial triangular mesh, with the vertices of the mesh being these feature points. Then, through spatial query and vector association techniques, the generated orientation constraint field is applied to the established initial triangular mesh. For each vertex in the mesh, by querying the vector corresponding to its coordinates in the orientation constraint field, the range of trend directions that the vertex is allowed to move during subsequent position adjustments is obtained and defined. Then, under the applied directional constraints, an energy minimization mathematical model containing multiple constraint terms is constructed and solved using an iterative optimization algorithm such as gradient descent. This globally adjusts the positions of all vertices in the initial triangular mesh. This optimization process forces the new positions of the vertices to simultaneously satisfy three content structure rules: all vertices corresponding to the text baseline points satisfy the first geometric rule (i.e., remain parallel), all seal outline points belonging to the same seal satisfy the second geometric rule (i.e., form a closed shape), and all binding hole points satisfy the third geometric rule (i.e., be distributed along a straight line). Finally, after the optimization adjustment is completed, the coordinate difference between each mesh vertex before and after adjustment is calculated by traversing the mesh, the displacement vector of each vertex is recorded, and the vectors are organized and stored according to their spatial indices. This ultimately forms an association mapping relationship to characterize the mapping relationship between the physical deformation of the carrier and the visual appearance of the content.
[0086] For example, following the specific implementation of the previous step, the image of a Qing Dynasty ancient book is processed. First, the overall curvature of the image from the lower left to the upper right is described and transformed into a vector field covering the entire image. The vector in the lower left region of the image points to the upper right, while the vectors in the middle and upper right of the image gradually change according to the physical model. Second, using all the previously extracted text baseline points, seal outline points, binding hole points, and tea stain outline points as nodes, a triangulation algorithm is run to generate a triangular mesh covering the entire page of the ancient book image. Then, the orientation constraint field is associated with each vertex of the triangular mesh, such as stipulating that the lower left corner vertex can only move in the upper right direction, while the lower right corner vertex can only move in the upper right direction. The vertices near the complex area are subject to greater constraints on their movement direction. Under these directional constraints, the optimization algorithm begins to move the vertices, attempting to make the text baseline points representing different columns of text parallel to each other, keep the four outline points of the square stamp square, and align the three binding hole points on a vertical line. At the same time, the movement of all vertices must conform to the set directional range. Finally, after optimization, the coordinates of each vertex of the triangular mesh before and after movement are recorded. For example, if a vertex in the lower left corner moves from coordinates 10,20 to 12,22, the change of +2 is recorded. All such displacement data of vertices are integrated to form the final associative mapping relationship.
[0087] This step combines the directional constraint field describing the physical deformation law with the feature points and rules describing the geometric structure of the document content, and performs collaborative calculations under a unified triangular mesh optimization framework. This successfully generates an associated mapping relationship, which is not simply a physical deformation deduction, nor simply a content structure alignment, but rather the result of the compromise and fusion between physical laws and visual priors. It reflects the general trend of the carrier bending due to physical reasons, while forcibly maintaining the regular geometric shape that the document content should have.
[0088] Step 104: Using a pre-trained deep learning network, determine the first deformation component and the second deformation component from the archive image according to the association mapping relationship, so as to obtain the first correction mapping and the second correction mapping.
[0089] Optionally, step 104 may specifically include: Step 1041: The initial file image and the associated mapping relationship are concatenated to form combined input data, and the combined input data is input into a pre-trained deep learning network.
[0090] Step 1042: Extract image features of the initial archive image at different resolutions through the first processing stage of the deep learning network.
[0091] Step 1043: Through the second processing stage of the deep learning network, the image features at different resolutions are analyzed according to the correlation mapping relationship. Features that are consistent with the overall trend of the correlation mapping relationship are separated from the image features as first deformation features, and local features that are inconsistent with the overall trend of the correlation mapping relationship are separated as second deformation features.
[0092] Step 1044: Input the first deformation feature into the third processing stage of the deep learning network to generate a first displacement field, use the first displacement field as a first correction mapping, and input the second deformation feature into the fourth processing stage of the deep learning network to generate a second displacement field, use the second displacement field as a second correction mapping.
[0093] Optionally, step 1044 may specifically include the following steps: inputting the first deformation feature into the third processing stage of the deep learning network, performing multi-level sampling operations on the first deformation feature, and merging the first deformation feature at the current scale with the image features of the corresponding scale extracted from the first processing stage after each upsampling operation; after completing all levels of upsampling and feature merging operations, inputting the obtained resolution feature map into a transformation layer to predict a two-dimensional displacement vector for each pixel in the initial archive image; integrating the two-dimensional displacement vectors predicted for all pixels to form a first displacement field, and using the first displacement field as a first correction mapping; inputting the second deformation feature into the fourth processing stage, analyzing the second deformation feature, and identifying local regions in the initial archive image that have a second preset condition; generating displacement field segments based on the second deformation feature corresponding to the local region; combining the displacement field segments corresponding to all local regions to form a second displacement field, and using the second displacement field as a second correction mapping.
[0094] In this step, the pre-trained deep learning network refers to a computer program model with a specific hierarchical structure, trained on a large number of labeled archival images and their correction data, used to automatically analyze and process complex deformation patterns in images, and in this application represents an intelligent analysis model.
[0095] The first deformation component refers to a smooth and continuous deformation component that is parsed from the archival image and is consistent with the overall physical deformation pattern described by the associated mapping relationship. It is used to correct the overall curvature or distortion of the image.
[0096] The second deformation component refers to the local, discontinuous deformation component that is parsed from the archival image and is inconsistent with the overall physical deformation pattern described by the associated mapping relationship. It is used to correct local wrinkles, damage and other detailed distortions in the image.
[0097] The first correction mapping refers to a two-dimensional vector field that defines how to apply a smooth, continuous displacement to each pixel in the image to eliminate the first deformation component of the image. It is obtained by processing the first deformation feature through the third processing stage of the deep learning network.
[0098] The second correction mapping refers to a two-dimensional vector field that defines how to apply discontinuous displacement to pixels in a specific local region of an image, used to eliminate the second deformation component of the image. It is obtained by processing the second deformation features through the fourth processing stage of the deep learning network.
[0099] Combined input data refers to multi-channel data blocks formed by stitching together the initial archive image and associated mapping relationships in the channel dimension. It is used to provide deep learning networks with complete input containing original image information and physical-content guidance information.
[0100] The first processing stage refers to the component of the deep learning network front end used to extract multi-scale visual information. It is usually composed of multiple convolutional and downsampling layers, used to capture features of different levels of abstraction and spatial scales from the input image, and is calculated through the forward propagation algorithm.
[0101] Image features refer to the mid-to-high-level abstract representations that deep learning networks learn from input images, which can characterize the content and structure of images. They are usually multi-dimensional arrays used for subsequent deformation analysis and separation.
[0102] The second processing stage refers to the component in the deep learning network used for feature analysis and separation. It typically includes an attention mechanism or a feature decoupling module, which guides the separation of image features based on the correlation mapping relationship and is calculated through the forward propagation algorithm.
[0103] The first deformation feature refers to the feature representation that is separated from the image features in the second processing stage and is consistent with the overall trend of change in the associated mapping relationship, and is used to generate a smooth first correction mapping.
[0104] The second deformation feature refers to the local feature representation separated from the image features in the second processing stage that is inconsistent with the overall trend of the associated mapping relationship, and is used to generate a discontinuous second correction mapping.
[0105] The third processing stage refers to the component in the deep learning network specifically used to generate a smooth displacement field. It is usually an encoder-decoder structure used to upsample the first deformation features and convert them into dense displacement vector predictions, which are then calculated using the forward propagation algorithm.
[0106] The first displacement field refers to a dense data field covering the entire image area, containing a two-dimensional displacement vector at each location, used to describe the smooth deformation required for overall image correction.
[0107] The fourth processing stage refers to the component in the deep learning network specifically used to generate local discontinuous displacement fields. It typically includes region localization and fragment generation modules, which are used to identify local distorted regions and generate corresponding displacement fragments, which are calculated through the forward propagation algorithm.
[0108] The second displacement field refers to a discontinuous displacement field composed of multiple displacement field segments that act only on local areas of the image. It is used to describe the discontinuous deformation required for local detail correction of the image.
[0109] A two-dimensional displacement vector is a data pair containing displacements in both horizontal and vertical directions. It is used to accurately describe the target position that a pixel needs to move to. It is obtained by regression prediction of each pixel position through a transformation layer.
[0110] The second preset condition refers to a set of rules or standards used to determine whether a local area in an image has complex detail distortions such as wrinkles, damage, or ink smudges that require separate processing. These rules are used to guide the fourth processing stage in locating the local area. In this application, areas with wrinkles, damage, or ink smudges meet the second preset condition.
[0111] A displacement field segment refers to a small and independent first displacement field that covers only a specific local area in an image and is used to correct the second deformation component of that specific area.
[0112] In this step, firstly, the pixel data of the initial archival image and the displacement vector data of the associated mapping relationship are merged in the channel dimension using data channel stitching technology. The three color channels of the initial archival image are connected with the two displacement component channels of the associated mapping relationship, thus forming a combined input data containing more information dimensions, which is then input into the pre-trained deep learning network. Secondly, this combined input data enters the first processing stage of the deep learning network, which consists of multiple convolutional layers and pooling layers stacked alternately. The convolutional layers perform filtering and feature extraction operations on the combined input data, and the pooling layers downsample the feature map to reduce its spatial resolution and expand the receptive field, thereby gradually extracting the image features of the initial archival image at multiple different resolution scales. Next, the obtained multi-scale image features are input into the second processing stage of the deep learning network, which integrates an attention mechanism module. Then, the association mapping information inherent in the combined input data is used as a guiding signal to perform importance reweighting and feature recombination operations on the image features from various resolutions. Through network calculation, features that are consistent with the overall trend of the association mapping are activated, enhanced, and aggregated to form the first deformation feature. At the same time, those local features that contradict the overall trend are activated and separated to form the second deformation feature. The first deformation feature is then input into the third processing stage of the network. This third processing stage is a feature decoder consisting of multiple upsampling layers and convolutional layers. It performs multi-level progressive upsampling operations on the first deformation feature through deconvolution or interpolation algorithms to restore its spatial size. After each upsampling, it uses skip connection technology to perform channel merging operations on the first deformation feature at the current scale and the image features of the corresponding scale extracted from the first processing stage to fuse high-level semantics and low-level details. After completing upsampling and feature merging of all layers, a dense feature map with the same resolution as the original image is obtained. Finally, the dense feature map is input into a specific transformation layer, which uses convolution operations to regress and predict a two-dimensional displacement vector containing horizontal and vertical displacement values for each pixel position in the image. The displacement vectors predicted by all pixels are then arranged in space to form a smooth and continuous first displacement field covering the entire image, which is the first correction mapping. Simultaneously, the second deformation feature is input into the fourth processing stage of the network. This fourth processing stage first analyzes the second deformation feature through a region proposal network module, identifying multiple local region coordinates in the image that meet the second preset conditions learned by the network for judging local complex distortions such as wrinkles and damage. Then, for each identified local region, based on its corresponding second deformation feature, a small fully convolutional network generates an independent displacement field segment that only covers the range of that region. Finally, by splicing all these generated displacement field segments according to their corresponding coordinate positions into a blank displacement field template of the same size as the image, a complete but spatially discontinuous second displacement field is formed, which is the second correction mapping.
[0113] For example, following the specific implementation of the previous step, deformation component analysis is performed on the image of a Qing Dynasty ancient book. First, the initial RGB image of the Qing Dynasty ancient book image is concatenated with the obtained correlation mapping relationship, and a data containing two displacement components, U and V, is stitched together on the channel to form a 5-channel combined data. Second, this combined data is input into a trained U-Net-like neural network. Its encoder part, i.e., the first processing stage, extracts multi-layer feature maps of the image at different resolutions such as 1 / 1, 1 / 2, 1 / 4, and 1 / 8 through convolution and pooling. Then, the bottleneck attention module of the network, i.e., the second processing stage, uses the correlation mapping relationship information to separate the mode representing the overall curvature from the lower left to the upper right from these multi-layer features. The first deformation feature represents the local paper wrinkles near the tea stain in the lower right corner and a small tear next to the stamp. Then, the first deformation feature enters the decoder, which is the third processing stage. After upsampling, it is merged with the corresponding layer features of the encoder. Finally, a convolutional layer predicts the displacement of each pixel, forming a smooth first displacement field, which is stretched to the upper right, i.e., the first correction mapping. At the same time, the second deformation feature enters another branch, i.e., the fourth processing stage. This branch locates the two local regions of wrinkles and tears, and generates two small, irregularly oriented displacement field segments for these two regions. After splicing them together, a discontinuous second displacement field, i.e., the second correction mapping, is formed.
[0114] This step uses a carefully designed, pre-trained deep learning network to intelligently decompose complex archival image distortions into two physically meaningful components: global smooth deformation and local detail deformation, guided by the physical-content dual framework of the correlation mapping relationship. Corresponding correction maps are generated for each component, avoiding the limitations of traditional single correction maps in handling complex distortions.
[0115] Step 105: Merge the first correction mapping and the second correction mapping, and perform a geometric transformation on the archive image to obtain the corrected target archive image.
[0116] Optionally, step 105 may specifically include: Step 1051: Superimpose the first displacement field defined by the first correction mapping and the second displacement field defined by the second correction mapping to obtain the target displacement field. In the image region where the first displacement field and the second displacement field coexist, the displacement vectors of the first displacement field and the second displacement field are weighted and summed.
[0117] Step 1052: Calculate a target coordinate position for each pixel in the initial archive image based on the target displacement field.
[0118] Step 1053: Resample the pixel color values in the initial file image according to the target coordinate position of the pixel, and arrange all the resampled pixel color values according to the target coordinate position to form the corrected target file image.
[0119] In this step, the corrected target archive image refers to the digital image whose geometry has been restored after a complete geometric distortion correction process. It is used to present and preserve the corrected archive content.
[0120] The target displacement field refers to a comprehensive two-dimensional vector field that integrates the first displacement field and the second displacement field and covers the entire image area. It is used to uniformly describe the precise displacement required for each pixel in the image to complete the final correction.
[0121] The target coordinate position refers to the new position coordinates that each pixel in the initial file image should appear in the corrected target image, calculated during the geometric transformation process. It is used to guide the rearrangement of pixel colors and is calculated by adding the displacement vector defined by the target displacement field at that point to the original coordinates of the pixel.
[0122] In this step, the first displacement field and the second displacement field are merged and calculated using vector field superposition and weighted fusion techniques. An empty field with the same size as the image is first created, and each position is judged: if the position exists in only one displacement field, its vector is directly copied; if the position exists in two displacement fields, the two displacement vectors are weighted and summed. Through this point-by-point calculation, a unified target displacement field is finally obtained. Secondly, the corrected position of each pixel in the initial image is calculated using coordinate transformation calculation techniques. For the pixel with coordinates x, y, its displacement vector Δx, Δy is queried from the target displacement field, and then its target coordinate position x + Δx, y + Δy is calculated by vector addition. This process is repeated for all pixels.
[0123] Finally, the image is reconstructed based on the target coordinates of all pixels using image resampling and interpolation techniques. Since the target coordinates are mostly floating-point numbers, they need to be integer pixel positions X and Y of the target image. Using bilinear interpolation algorithm, the color that the integer pixel position should have is calculated and synthesized based on the color value and relative distance of the surrounding original pixels. After the full image is filled, the final corrected target file image is generated.
[0124] For example, following the specific implementation of the previous step, the final correction of the Qing Dynasty ancient book image is performed. First, the first displacement field describing the overall stretching is fused with the second displacement field targeting local wrinkles and damage. In most areas of the image, the vector of the first displacement field is directly used. Second, in the wrinkled area in the lower right corner, the vectors of the two displacement fields at that point are weighted and fused to obtain a comprehensive displacement vector. Then, at individual damage points, the correction vector of the second displacement field is mainly used. In this way, a complete and unified target displacement field is formed. Then, using this target displacement field, the new position of each pixel in the original image in the corrected image is calculated, i.e., the target coordinate position. Subsequently, based on the new positions of all pixels, the color value of each pixel in the corrected image is resampled from the original image and calculated using a bilinear interpolation algorithm. Finally, a target archival image is generated that has straight text, square seals, and effectively improved local wrinkles and damage.
[0125] This step is the final implementation stage of the correction process. It comprehensively utilizes all the prior knowledge and analysis results from the previous steps, transforming the deformation components derived under the guidance of physical laws and the constraints of content structure into precise and reversible geometric adjustments to the pixel positions of the original image. This results in a corrected archival image that achieves maximum restoration in geometric shape and maintains high fidelity in visual content.
[0126] Figure 2 This application provides a schematic diagram of the structure of a deep learning-based archival image distortion correction system, as shown below. Figure 2 As shown, the system includes: The acquisition module 21 is used to acquire the initial archive image to be corrected and the carrier attribute information corresponding to the initial archive image, as well as the deformation constraint conditions of the physical carrier of the archive. Extraction module 22 is used to extract multiple feature points from the document content from the initial archive image. The feature points include text baseline points, seal outline points, binding hole points, and specific stain points. The coupling module 23 is used to couple the deformation constraint conditions with the spatial distribution of the feature points to obtain an association mapping relationship, which is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content. The determination module 24 is used to determine the first deformation component and the second deformation component from the archive image based on the association mapping relationship using a pre-trained deep learning network, so as to obtain the first correction mapping and the second correction mapping. The fusion module 25 is used to fuse the first correction mapping and the second correction mapping to perform geometric transformation on the archive image to obtain the corrected target archive image.
[0127] Figure 2 The aforementioned deep learning-based archival image distortion correction system can perform... Figure 1 The implementation principle and technical effects of the deep learning-based archival image distortion correction method described in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the deep learning-based archival image distortion correction system in the above embodiments perform their operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0128] In one possible design, Figure 2 The deep learning-based archival image distortion correction system of the illustrated embodiment can be implemented as a computing device, such as... Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32; The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processing component 32.
[0129] The processing component 32 is used for the above Figure 1 The embodiment describes a deep learning-based method for correcting archival image distortion.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for correcting archival image distortion based on deep learning, characterized in that, include: Obtain the initial archival image to be corrected and the carrier attribute information corresponding to the initial archival image, as well as the deformation constraints of the physical carrier of the archive; Multiple feature points are extracted from the document content from the initial archive image. These feature points include text baseline points, seal outline points, binding hole points, and specific stain points. By coupling the deformation constraints with the spatial distribution of the feature points, an association mapping relationship is obtained. This association mapping relationship is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content. Using a pre-trained deep learning network, the first deformation component and the second deformation component are determined from the archive image according to the association mapping relationship, so as to obtain the first correction mapping and the second correction mapping; By fusing the first correction mapping and the second correction mapping, a geometric transformation is performed on the archive image to obtain a corrected target archive image.
2. The method for correcting archival image distortion based on deep learning according to claim 1, characterized in that, Obtaining the initial archival image to be corrected and the corresponding carrier attribute information, as well as the deformation constraints of the archival physical carrier, includes: Initial archival images are acquired using a scanning device; Obtain the carrier attribute information associated with the initial archival image. The carrier attribute information includes the material category of the physical carrier of the archive, the position coordinates of the binding line on the physical carrier of the archive, and the historical restoration area marker of the physical carrier of the archive. Based on the material category, the elastic and plastic parameters corresponding to the material category are matched from a preset material parameter library; Using the position coordinates of the binding line on the physical carrier of the archive as the constraint boundary, and in conjunction with the historical restoration area marker, the fixed constraint area of the physical carrier of the archive at the position coordinates of the binding line and the locally hardened constraint area at the historical restoration area marker are determined. Based on the elastic parameters, the plastic parameters, the fixed constraint region, and the locally hardened constraint region, a stress deformation simulation model of the physical carrier of the archive is constructed. The deformation output of the stress deformation simulation model under typical environmental parameters is quantified into a trend description of the displacement direction of pixels in the archive image, and the trend description is used as a deformation constraint condition.
3. The method for correcting archival image distortion based on deep learning according to claim 1, characterized in that, Multiple feature points are extracted from the document content from the initial archive image. These feature points include text baseline points, stamp outline points, binding hole points, and specific stain points, including: The initial archive image is converted into a binary image, and multiple independent connected regions are identified in the binary image; From the multiple independent connected regions, based on the geometric properties and arrangement rules of the connected regions, the text connected regions that constitute the text line are selected, and the text baseline point is determined based on the position of the text connected regions. In the binary image, regions that meet the first preset conditions are identified as candidate regions for the seal, and the outer contour points of the candidate regions for the seal are extracted as seal contour points. Circular abnormal regions are detected in the edge area of the initial archive image, and the binding hole point is located from the abnormal region by combining the binding line position coordinates in the carrier attribute information. Color analysis is performed on the initial archive image to separate color abnormal regions, and based on the shape and color features of the color abnormal regions, the boundary contour points of the color abnormal regions are extracted as specific stain points.
4. The method for correcting archival image distortion based on deep learning according to claim 1, characterized in that, By coupling the deformation constraints with the spatial distribution of the feature points, an association mapping relationship is obtained. This association mapping relationship is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content, including: The pixel displacement direction trend described in the deformation constraint condition is transformed into a directional constraint field applied to the image plane of the initial file. Using the text baseline point, the seal outline point, the binding hole point, and the specific stain point as control points, an initial triangular mesh is established on the initial file image; The directional constraint field is applied to each vertex of the initial triangular mesh, such that the movable direction of each vertex is restricted to the trend direction specified by the directional constraint field. Under the constraints of the directional constraint field, the positions of all vertices in the initial triangular mesh are adjusted according to the first geometric rule that the text baseline points should remain parallel, the second geometric rule that the stamp outline points should remain closed, and the third geometric rule that the binding hole points should be distributed along a straight line. After the adjustment is completed, the coordinate changes of the vertices of the initial triangular mesh before and after the position adjustment are recorded to obtain the associated mapping relationship.
5. The method for correcting archival image distortion based on deep learning according to claim 1, characterized in that, Using a pre-trained deep learning network, based on the association mapping relationship, a first deformation component and a second deformation component are determined from the archive image to obtain a first correction mapping and a second correction mapping, including: The initial file image is concatenated with the associated mapping relationship to form combined input data, and the combined input data is then input into a pre-trained deep learning network. The first processing stage of the deep learning network extracts image features of the initial archive image at different resolutions. In the second processing stage of the deep learning network, the image features at different resolutions are analyzed according to the correlation mapping relationship. Features that are consistent with the overall trend of the correlation mapping relationship are separated from the image features as first deformation features, and local features that are inconsistent with the overall trend of the correlation mapping relationship are separated as second deformation features. The first deformation feature is input into the third processing stage of the deep learning network to generate a first displacement field, which is used as a first correction mapping. The second deformation feature is input into the fourth processing stage of the deep learning network to generate a second displacement field, which is used as a second correction mapping.
6. The deep learning-based archival image distortion correction method according to claim 5, characterized in that, The first deformation feature is input into the third processing stage of the deep learning network to generate a first displacement field, which is used as a first correction mapping. The second deformation feature is input into the fourth processing stage of the deep learning network to generate a second displacement field, which is used as a second correction mapping. This process includes: The first deformation feature is input into the third processing stage of the deep learning network, and multi-level sampling operations are performed on the first deformation feature. After each upsampling operation, the first deformation feature at the current scale is merged with the image features at the corresponding scale extracted from the first processing stage. After completing the upsampling and feature merging operations at all levels, the resulting resolution feature map is input into a transformation layer to predict a two-dimensional displacement vector for each pixel in the initial archive image. The two-dimensional displacement vectors predicted from all pixels are integrated to form a first displacement field, and the first displacement field is used as the first correction mapping. The second deformation feature is input into the fourth processing stage to analyze the second deformation feature and identify local areas in the initial archive image that meet the second preset conditions. Based on the second deformation feature corresponding to the local region, a displacement field segment is generated; Combine all the displacement field segments corresponding to the local regions to form a second displacement field, and use the second displacement field as a second correction mapping.
7. The method for correcting archival image distortion based on deep learning according to claim 1, characterized in that, By fusing the first correction mapping and the second correction mapping, a geometric transformation is performed on the archive image to obtain a corrected target archive image, including: The first displacement field defined by the first correction mapping and the second displacement field defined by the second correction mapping are superimposed to obtain the target displacement field. In the image region where the first displacement field and the second displacement field coexist, the displacement vectors of the first displacement field and the second displacement field are weighted and summed. Based on the target displacement field, calculate a target coordinate position for each pixel in the initial archive image; According to the target coordinate position of the pixel, the pixel color value is resampled in the initial archive image, and all the resampled pixel color values are arranged according to the target coordinate position to form the corrected target archive image.
8. A deep learning-based archival image distortion correction system, characterized in that, include: The acquisition module is used to acquire the initial archive image to be corrected, the carrier attribute information corresponding to the initial archive image, and the deformation constraint conditions of the physical carrier of the archive. The extraction module is used to extract multiple feature points from the document content from the initial archive image. The feature points include text baseline points, seal outline points, binding hole points, and specific stain points. The coupling module is used to couple the deformation constraints with the spatial distribution of the feature points to obtain an association mapping relationship, which is used to characterize the mapping between the physical deformation of the carrier and the visual appearance of the content. The determination module is used to use a pre-trained deep learning network to determine the first deformation component and the second deformation component from the archive image according to the association mapping relationship, so as to obtain the first correction mapping and the second correction mapping. The fusion module is used to fuse the first correction mapping and the second correction mapping, and perform geometric transformation on the archive image to obtain the corrected target archive image.
9. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a deep learning-based archival image distortion correction method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The system contains a computer program that, when executed by a computer, implements a deep learning-based method for correcting archival image distortion as described in any one of claims 1 to 7.