A deep learning-based epigraphic character image intelligent recognition method

By filtering edge structure fracture features in the image recognition of inscribed characters, and performing multi-size image transformation and grayscale mapping, the problem of stroke path interruption in the existing technology is solved, and the complete reconstruction of inscribed characters and the recognition stability are improved.

CN122176718APending Publication Date: 2026-06-09LULIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LULIANG UNIV
Filing Date
2026-03-05
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing deep learning-based methods for recognizing inscription characters struggle to effectively identify the local connections between strokes when dealing with areas where image edges are abrupt and structures are frequently broken. This results in interrupted stroke paths and incomplete regions, affecting the accuracy of extracting closed character structures and the overall stability of recognition.

Method used

By scanning edge regions with significant grayscale changes in the image, edge structure breakage features are screened out. Multi-size image transformation and grayscale edge connectivity trend analysis are performed. Image combinations with consistent edge trends are retained. Line segment combinations are completed by combining path proximity relationships. Direction and grayscale mapping processing is performed to establish a stroke image alignment set with unified direction and completed intensity mapping.

Benefits of technology

It enhances the stability of edge structures under complex scale changes, ensures continuous stroke connection, and improves the reliability of reconstructing and recognition accuracy of inscribed character structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176718A_ABST
    Figure CN122176718A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of epigraphic character image recognition, in particular to an epigraphic character image intelligent recognition method based on deep learning, which comprises the following steps: screening a broken position for a gray-scale mutation edge of an epigraphic image, reserving a stable trend in combination with multi-size edge consistency, connecting strokes based on a path approaching relationship, uniformly aligning strokes and gray scales, and judging and extracting a closed character contour image set through closed integrity judgment. The application distinguishes the broken position by judging the edge trend jump relationship in the gray-scale mutation area, screens stable structures in combination with multi-size edge consistency, connects strokes by using the path approaching relationship, makes the stroke trend keep continuous, realizes the consistency of stroke space and intensity after the direction is unified and the gray scale is mapped, and finally forms a closed contour through closed integrity screening, so that the character structure under the condition of broken and worn parts still has overall coherence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of stone inscription image recognition technology, and in particular to an intelligent recognition method for stone inscription images based on deep learning. Background Technology

[0002] The field of epigraphic text image recognition technology encompasses methods and technologies for collecting, processing, and recognizing textual information from unstructured image data such as historical documents, stone carvings, and cliff inscriptions. Its core content combines image recognition with text analysis, achieving automatic recognition of epigraphic text images with low contrast, complex backgrounds, and severely distorted fonts through processes such as image preprocessing, character localization, image enhancement, feature extraction, and text recognition. Overall, this field covers multiple stages including image perception, image segmentation, character extraction, and classification, and extensively integrates deep learning models from artificial intelligence and their applications in image pattern recognition, aiming to achieve accurate reading and analysis of epigraphic text symbols under complex visual conditions.

[0003] One method for intelligent recognition of inscribed text images based on deep learning refers to a specific approach that uses convolutional neural networks and recurrent neural networks to perform feature modeling and sequence recognition of text regions in inscribed images. This method first performs noise suppression and structure enhancement on the input inscribed image using an image classification network. Then, it utilizes a feature pyramid mechanism to detect text regions at different scales layer by layer. Next, the detected image regions are input into a bidirectional recurrent neural network for sequence modeling. Finally, a connection-based temporal classification loss function is used for text decoding and output. This method encompasses multiple specific operational steps, including image preprocessing, region extraction, feature representation, temporal modeling, and decoding output, to construct a recognition process adapted to the characteristics of inscribed text.

[0004] Existing technologies mainly rely on deep learning models to complete overall feature modeling and text sequence recognition. When dealing with areas where there are obvious abrupt changes in image edges and frequent structural breaks, it is difficult to effectively identify the local connection relationship of strokes. Especially in scenarios with large changes in image scale or poor edge continuity, it often leads to problems such as interrupted stroke paths and incomplete regions. At the same time, it does not adequately model the uniformity of stroke direction and the standardization of gray intensity, which can easily cause chaotic stroke arrangement and gray response deviation, thereby affecting the accuracy of character closed structure extraction and overall recognition stability. Summary of the Invention

[0005] To address the technical problems existing in the prior art, this invention provides a method for intelligent recognition of inscribed text images based on deep learning. The technical solution is as follows:

[0006] A deep learning-based intelligent recognition method for inscribed text images includes the following steps:

[0007] S1: After acquiring the image data of the inscription, the edge regions with obvious gray-scale changes in the image are scanned. The edge trend direction of each sub-region of the image is compared with the extension trend of the adjacent sub-region. The image locations with fracture jump characteristics are selected and an image segmentation set containing edge structure fracture characteristics is generated.

[0008] S2: Perform multi-size image transformation on the image segmentation region in the image segmentation set containing edge structure fracture features, extract the gray-scale edge connectivity trend of the corresponding region, compare and analyze the edge contour consistency in the multi-size images, retain the image combination with consistent edge trend, and establish the image edge response combination set after size consistency is confirmed.

[0009] S3: Call the image edge response combination set after the size consistency is confirmed, compare the direction and distance of the start and end positions of the edge line segments in the image, and complete the line segment combination under the condition of satisfying the path proximity relationship to generate a continuous stroke image set constructed by the path proximity.

[0010] S4: For the continuous stroke image set constructed by path proximity, the stroke direction is compared with the overall arrangement direction and the direction is adjusted. At the same time, the grayscale range of the image is mapped and the direction adjustment result is aligned and fused with the grayscale mapping result to establish a stroke image alignment set with unified direction and completed intensity mapping.

[0011] As a further aspect of the present invention, the image segmentation set containing edge structure breakage features includes edge breakage region labels, image local structural anomaly information, and edge extension direction variation records; the image edge response combination set includes multi-scale edge connectivity description, size consistency verification results, and edge trend direction matching information; the continuous stroke image set includes path connection relationship graph, stroke segment connection information, and edge splicing feasibility identifier; and the stroke image alignment set includes orientation normalization image, grayscale mean mapping map, and stroke position registration parameters.

[0012] As a further aspect of the present invention, the step of obtaining S1 is as follows:

[0013] S101: After acquiring the image data of the inscription, monitor the gray-level gradient amplitude value of each pixel within the complete image range. Based on the relationship between the gray-level gradient amplitude value and the gray-level change threshold at each location, filter out pixel locations where the gray-level gradient amplitude value is less than the gray-level change threshold, select all image sub-regions containing the remaining pixel locations, and generate a set of gray-level abrupt change sub-regions.

[0014] S102: Based on the pixel distribution of each image sub-region in the set of gray-scale abrupt sub-regions, extract the edge gradient vector direction information in the horizontal and vertical directions, obtain the edge gradient vector direction information in adjacent image sub-regions respectively, perform direction angle difference analysis on the edge direction change amplitude of adjacent regions, and filter out image sub-regions with inconsistent edge trend directions according to whether the direction angle difference is greater than the edge extension continuity breakage threshold, and generate a set of edge trend breakage region pairs;

[0015] S103: For all image sub-region pairs contained in the set of edge trend breakage regions, extract the position coordinate range of each image sub-region, aggregate all pixel regions where edge breakage occurs, and combine all edge breakage regions into multiple segmentation region units according to the spatial connectivity rules in the image coordinate system to generate an image segmentation set containing edge structure breakage features.

[0016] As a further aspect of the present invention, the step of obtaining S2 is as follows:

[0017] S201: After obtaining the image segmentation set containing edge structure fracture features, for each image segmentation region in the set, multiple preset size scaling rules are executed to form multi-size image data frames, and a size mapping relationship between each image segmentation region and the corresponding multi-size image data frame is established to generate a multi-size image region mapping set.

[0018] S202: Based on the multi-size image region mapping set, extract the gray-scale edge connectivity trend sequence of the corresponding region in each size image data frame, call the gray-scale edge connectivity trend sequence in different size image data frames, compare them one by one according to the edge contour direction consistency judgment benchmark, filter the size combination whose edge extension direction has not shifted, and generate a size combination set with consistent edge trend.

[0019] S203: For the set of size combinations with consistent edge trends, aggregate edge response data of the same image segmentation region at different sizes, establish the correlation between size identifier and edge response trend, integrate them to form a unified response structure unit, and generate an image edge response combination set.

[0020] As a further aspect of the present invention, the step of obtaining S3 is as follows:

[0021] S301: Call each image in the image edge response combination set after the size consistency is confirmed, detect the start coordinates and end coordinates of all edge line segments in the image, pair and organize the start and end positions of the line segments according to the coordinate index relationship, and generate an edge line segment endpoint pairing set.

[0022] S302: Based on the edge segment endpoint pairing set, compare the directional proximity relationship between the endpoint direction vector of each segment and the starting direction vector of the adjacent segment, and at the same time determine the relationship between the pixel spacing between the two endpoints and the edge splicing range threshold, filter the segment combinations that meet the directional proximity and spacing compliance, and generate a splicable segment combination set.

[0023] S303: For the set of splicable line segments, aggregate edge segment paths according to the line segment connection order, establish continuous path topology, merge line segments in the same path into a single stroke structure, and generate a set of continuous stroke images constructed by path proximity.

[0024] As a further aspect of the present invention, the step of obtaining S4 is as follows:

[0025] S401: After obtaining the continuous stroke image set, detect the direction angle information of each stroke region, call the main layout direction parameter of the image, compare the direction angle of the stroke region with the main layout direction of the image, filter the stroke regions with inconsistent direction angles and perform direction angle adjustment operation to generate a stroke image set with consistent direction.

[0026] S402: For the set of stroke images with consistent direction, monitor the gray value distribution range of each stroke region, perform mapping transformation on the gray range of each stroke region according to the preset gray mean mapping rule, classify the intensity range of the stroke region into the standard gray channel, and generate a gray-scale mapped stroke image set.

[0027] S403: Based on the set of stroke images with consistent orientation and the set of stroke images with grayscale mapping, extract the position coordinate information of the corresponding stroke regions, perform alignment processing according to the position coordinate relationship, fuse the image data with consistent orientation and the image data with grayscale mapping, establish a unified structural relationship, and generate a set of stroke image alignment with consistent orientation and intensity mapping.

[0028] As a further aspect of the present invention, the method further includes:

[0029] S5: Based on the stroke path information in the stroke image alignment set that is oriented uniformly and has completed intensity mapping, check the edge closure of the image region, extract the character outline boundary in the region that meets the closure condition, and output the inscription character image data set with structural closure.

[0030] The inscription character image data set includes structurally closed image units, character outline boundary lines, and stroke closure integrity annotations.

[0031] As a further aspect of the present invention, the step of obtaining S5 is as follows:

[0032] S501: After obtaining the stroke image alignment set with unified direction and completed intensity mapping, extract the start coordinates and end coordinates of all stroke paths in the image, count the endpoint distribution density of stroke paths in each region, and filter image regions with closure potential according to the start and end point density evaluation criteria to generate a candidate closed loop region set.

[0033] S502: Based on the candidate closed-loop region set, monitor the connection status of the edge paths of each region, identify whether there are opening breakage positions, and according to the edge closure integrity judgment rule, remove the path regions with broken edge structures, retain the image blocks with closed and continuous structures, and generate a closed image block set.

[0034] S503: For the set of closed image blocks, extract the coordinate point sequence of the outer contour boundary of each block, construct a single continuous closed contour, and call the data of the corresponding coordinate area in the original image to perform image cropping and pixel aggregation to generate a set of inscribed character image data.

[0035] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0036] In this invention, by introducing a method to determine the edge trend jump relationship in gray-scale abrupt change areas, the edge break position is distinguished from the overall image. Combined with edge consistency screening under multi-size conditions, the stability preservation ability of the edge structure under complex scale changes is enhanced. Furthermore, the edge segment combination is completed by using the path direction convergence relationship, so that the stroke direction has continuous connection characteristics. After direction unification and gray-scale mapping registration, different strokes are kept consistent in spatial arrangement and intensity distribution. Finally, closed areas are screened based on the density of start and end points and the integrity of closure, so that the character structure can still form a complete outline under fracture and wear conditions, which helps to improve the overall reliability of the reconstruction of the stele character structure. Attached Figure Description

[0037] Figure 1 This is a flowchart of the method of the present invention;

[0038] Figure 2 This is a flowchart illustrating the acquisition process of S1 in this invention;

[0039] Figure 3 This is a flowchart illustrating the acquisition process of S2 in this invention;

[0040] Figure 4 This is a flowchart illustrating the acquisition process of S3 in this invention;

[0041] Figure 5 This is a flowchart illustrating the acquisition process of S4 in this invention;

[0042] Figure 6 This is a flowchart of the acquisition process for S5 of the present invention. Detailed Implementation

[0043] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0044] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0045] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0046] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0047] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0048] Please see Figure 1 This invention provides a technical solution: a method for intelligent recognition of inscription images based on deep learning, comprising the following steps:

[0049] S1: After acquiring the image data of the inscription, scan the edge areas with prominent grayscale changes in the whole image, compare the edge trend direction of each image sub-region with the edge extension trend of its adjacent sub-regions to see if there are any breakage or jump features, filter out the image locations with edge discontinuities, and generate an image segmentation set containing edge structure breakage features.

[0050] S2: Perform multi-size image transformation processing on each image segmentation region in the image segmentation set containing edge structure fracture features, extract the gray-scale edge connectivity trend of the corresponding region in each size image, and then compare and analyze the edge contour consistency of each size image to determine whether there is a response change shift in the edge extension direction in the multi-size image. By retaining the image combination with consistent edge trend, establish the image edge response combination set after size consistency is confirmed.

[0051] S3: Call each image in the image edge response combination set after size consistency confirmation, pair the start and end coordinates of the edge line segments in each image, compare whether there is a proximity relationship between the end direction and the start direction of the line segments, and determine whether the pixel spacing between the two ends is within the edge stitching range. If the connection conditions are met, complete the combination of stroke edge segments and generate a continuous stroke image set constructed by path proximity.

[0052] S4: For each stroke region in the continuous stroke image set constructed by path proximity, the orientation angle is compared with the main layout direction of the image. Inconsistent stroke orientations are adjusted to a unified orientation expression standard. At the same time, mean mapping is performed on the image grayscale range to classify the intensity range of each stroke region into the standard grayscale channel. Then, the orientation-consistent image and the grayscale mapping image are aligned and fused to establish a stroke image alignment set with unified orientation and completed intensity mapping.

[0053] S5: Based on the stroke path information of the stroke image alignment set with unified direction and completed intensity mapping, perform start and end point density and edge closure integrity checks on each closed direction region in the image to determine whether continuous strokes constitute a complete closed loop region. In the image block that meets the stroke closure standard, extract its contour boundary and output a set of inscribed character image data with structural closure.

[0054] The image segmentation set containing edge structural fracture features includes edge fracture region labels, local structural anomaly information, and edge extension direction variation records. The image edge response combination set includes multi-scale edge connectivity description, size consistency verification results, and edge trend direction matching information. The continuous stroke image set includes path connection relationship graphs, stroke segment connection information, and edge splicing feasibility indicators. The stroke image alignment set includes orientation normalization images, gray-scale mean mapping maps, and stroke position registration parameters. The inscribed character image data set includes structurally closed image units, character outline boundary lines, and stroke closure integrity annotations.

[0055] Please see Figure 2 The steps to obtain S1 are as follows:

[0056] S101: After acquiring the image data of the inscription, monitor the gray-level gradient amplitude value of each pixel within the complete image range. Based on the relationship between the gray-level gradient amplitude value and the gray-level change threshold at each location, filter out pixel locations where the gray-level gradient amplitude value is less than the gray-level change threshold, select all image sub-regions containing the remaining pixel locations, and generate a set of gray-level abrupt change sub-regions.

[0057] First, obtain the resolution. The grayscale image data of the inscription rubbing (pixels) is mapped to a two-dimensional Cartesian coordinate system. Among them Initialize the grayscale gradient monitoring program and iterate through the position of each pixel in the image. , call The Sobel operator convolution kernel performs a convolution operation on the pixel at that location and its eight neighboring pixels, respectively, to obtain the horizontal gradient components. gradient components in the vertical direction And according to the formula Calculate the grayscale gradient amplitude at this location; during this process, a grayscale change threshold is set based on background noise data from 500 historically sampled rubbings of similar stone inscriptions. Calculations show that the average grayscale gradient amplitude in non-stroke background areas (such as diffuse reflection from stone or paper texture) is... Standard deviation Based on Chebyshev's inequality and engineering experience, a safe range is set, and the following is taken: The threshold is set by rounding down. ;Execute point-by-point comparison logic, targeting The pixels, because Identified as background noise and removed, targeting The pixels, because Valid signals are retained; all retained pixel coordinates are stored in a dynamic array, and based on 4-neighbor or 8-neighbor connectivity rules, spatially adjacent retained pixels are aggregated to construct a sequence containing... A set of gray-level abrupt subregions of independent connected components. .

[0058] S102: Based on the pixel distribution of each image sub-region in the gray-level abrupt sub-region set, extract the edge gradient vector direction information in the horizontal and vertical directions, obtain the edge gradient vector direction information in adjacent image sub-regions respectively, perform direction angle difference analysis on the edge direction change amplitude of adjacent regions, and filter out image sub-regions with inconsistent edge trend directions according to whether the direction angle difference is greater than the edge extension continuity breakage threshold, and generate a set of edge trend breakage region pairs.

[0059] Traverse the set of gray-scale mutation sub-regions Each image sub-region Extract the gradient components of each pixel within the region. Using the formula Calculate the edge gradient vector direction angle of each pixel, and use the peak value of the histogram of the direction angles within the region as the main edge direction of that sub-region. ; Retrieve spatially adjacent sub-region pairs Obtain their respective main edge directions and Calculate the difference in the included angle between the edge directions of adjacent regions. Set the threshold for edge extension continuity breakage. This threshold is based on statistics of the tangential angle change rate at the turning points of 1000 standard Wei stele strokes. The upper limit of the angle change rate at continuous turning points of normal strokes is... ,set up To accommodate slight handwriting jitter; perform a judgment: if a pair of adjacent regions is measured... ,because This indicates a drastic change in direction between the two regions, suggesting inconsistent edge trends; if If the gradient direction is not met, it is considered continuous. As shown in Table 1, the gradient directions and determination results of some adjacent sub-regions are recorded. Among them, regions E-03 and E-05 are identified as having fracture characteristics due to excessively large differences. All regions that meet the criteria are considered continuous. The adjacent sub-regions of the condition are indexed to generate a set of edge trend break regions. .

[0060] Table 1: Analysis of Differences in Edge Gradient Direction between Adjacent Subregions

[0061] Area pair number Main direction of area A ( ) Main direction of region B ( ) Direction angle difference ( ) Threshold Standard ( ) Judgment Result E-01 45.2 48.5 3.3 <35 continuous E-02 90.0 95.1 5.1 <35 continuous E-03 15.0 75.0 60.0 >35 fracture E-04 120.5 118.2 2.3 <35 continuous E-05 30.0 85.0 55.0 >35 fracture

[0062] As shown in Table 1, the angle difference between regions E-03 and E-05 significantly exceeds the threshold, indicating that there are unnatural geometric abrupt changes at the connection points of these regions, which are classified as fracture features.

[0063] S103: For all image sub-region pairs contained in the edge trend breakage region pair set, extract the position coordinate range of each image sub-region, aggregate all pixel regions where edge breakage occurs, and combine all edge breakage regions into multiple segmentation region units according to the spatial connectivity rules in the image coordinate system to generate an image segmentation set containing edge structure breakage features.

[0064] Call the edge trend break region set For each pair of fracture regions in the set Extract its pixel coordinate range in the original image coordinate system. Introducing the Euclidean distance metric, the geometric centroid distance between all pairs of fracture regions is calculated. And set spatial connectivity rule thresholds. Pixels (approximately 1 / 4 of the average character width); perform cluster analysis, if the break is... and Distance between the centers of gravity ,because It was determined that both belonged to the same complex edge-damaged structure, and coordinate set operations were performed to... and All pixels involved are aggregated into the same segmentation region unit. Conversely, if If the fracture points are isolated, they remain independent; then, all elements in the set are traversed, and all adjacent or similar fracture features are merged, combining discrete fracture points into independent units with clear spatial boundaries. Each unit is assigned a unique region identifier (ID), ultimately generating a set containing... Image segmentation set containing edge structure breakage features of independent segmented region units .

[0065] Please see Figure 3 The steps to obtain S2 are as follows:

[0066] S201: After obtaining the image segmentation set containing edge structure fracture features, for each image segmentation region in the set, execute multiple preset size scaling rules to form multi-size image data frames, establish the size mapping relationship between each image segmentation region and the corresponding multi-size image data frame, and generate a multi-size image region mapping set.

[0067] Receive image segmentation sets containing edge structure breakage features For each image segmentation region within the set Obtain the corresponding local image data matrix; preset a set of multi-scale scaling factors. , representing the magnification and reduction ratios, respectively; for Perform bilinear interpolation to... For example, construct the target mesh and set the target pixel coordinates. Map back to source coordinates Select the grayscale values ​​of the four nearest pixels around the source coordinates. According to the distance weight formula Calculate the target grayscale and generate image data frames with half the resolution. Similarly, based on the remaining factors, Create a pointer index in memory and assign the original region ID. This set of image data frames with different resolutions Address binding is performed to construct a multi-size image region mapping set containing geometric dimension information and pixel data streams.

[0068] S202: Based on the multi-size image region mapping set, extract the gray-scale edge connectivity trend sequence of the corresponding region in each size image data frame, call the gray-scale edge connectivity trend sequence in different size image data frames, compare them one by one according to the edge contour direction consistency judgment benchmark, filter the size combination whose edge extension direction has not shifted, and generate a size combination set with consistent edge trend.

[0069] Traverse the multi-size image region mapping set, for each size image data frame The Canny edge detection algorithm is used to extract the grayscale edge connectivity trend sequence. The sequence consists of a series of edge pixel chains; a benchmark for determining the consistency of edge contour direction is set, namely, the normal direction deviation threshold of corresponding edge segments at different scales. Select a reference scale (usually 1000 rpm). Trend sequence Project its coordinates to other scale spaces (such as ), calculate the normal direction vector of the corresponding edge point. and The dot product is then used to find the included angle. If the maximum deviation of a certain edge segment is measured at the full scale... ,because The edge structure is determined to be robust and has not shifted; if a false edge formed by a noise point is in Disappearance or directional deviation If not, it is considered inconsistent; select those that satisfy at least 3 scales. The size combination is used to eliminate unstable features and generate a size combination set with consistent edge trends.

[0070] S203: For size combination sets with consistent edge trends, aggregate edge response data of the same image segmentation region at different sizes, establish the correlation between size identifier and edge response trend, integrate to form a unified response structure unit, and generate image edge response combination sets;

[0071] Processing sets of sizes with consistent edge trends for segmenting the same image region. At different scales Preserved edge response data (Edge intensity value), perform weighted fusion operation; set weight coefficients based on the information content of the scale factor. The original scale Adjacent scales Distant scale After spatially normalizing and aligning the edge maps at each scale, the fused response value is calculated pixel by pixel. For example, the normalized edge intensities of a pixel at various scales are respectively ,but The calculated result The matrix, as a unified response structural unit in the region, effectively suppresses random noise interference at a single scale and generates a high signal-to-noise ratio image edge response combination set.

[0072] Please see Figure 4The steps to obtain S3 are as follows:

[0073] S301: Call each image in the image edge response combination set after size consistency confirmation, detect the start coordinates and end coordinates of all edge line segments in the image, pair and organize the start and end positions of the line segments according to the coordinate index relationship, and generate an edge line segment endpoint pairing set.

[0074] The fused image data from the image edge response combination set is called, and skeletonization is performed to thin the edge response bands of a certain width into lines of single-pixel width. The set of pixels of the thinned lines is traversed, and the number of 8-neighbor connections of each pixel is counted. ,Will The pixels are identified as endpoints; the coordinate data of all endpoints are extracted, and each independent edge segment is recorded. starting coordinates coordinates of the endpoint Establish an adjacency list data structure, index and sort the endpoints of line segments based on the spatial proximity of coordinates, and associate and store the ID of each line segment with its endpoint attributes (type, coordinates, and the vector of the line segment to which it belongs) to generate a set of edge line segment endpoint pairs that are easy to retrieve later.

[0075] S302: Based on the edge segment endpoint pairing set, compare the directional proximity relationship between the endpoint direction vector of each segment and the starting direction vector of the adjacent segment, and at the same time determine the relationship between the pixel spacing between the two endpoints and the edge splicing range threshold, filter the segment combinations that meet the directional proximity and spacing compliance, and generate a set of splicable segment combinations.

[0076] Based on the endpoint pairing set of edge line segments, perform geometric affinity analysis between line segments; select line segments. endpoint vector (Fitted from the 5 pixels before the endpoint) and adjacent line segments The starting vector (Finding the angle between the directions of the two vectors by fitting the first 5 pixels after the starting point) Simultaneously calculate the Euclidean distance between the two endpoints. Set a direction approach threshold. Threshold for edge splicing range Pixels; for example, for line segment pair L-01, measured Pixels ,because and The conditions of directional convergence and spacing compliance are met; for line segment pair L-02, the measurements are as follows: Pixels ,because If the spacing is too large, the line segment will not be spliced. As shown in Table 2, the calculation parameters and judgment results of some line segment combinations are listed. All line segment combinations with the judgment result of "pass" are selected to generate a set of splicable line segment combinations.

[0077] Table 2: Parameter Table for Determining Edge Line Segment Splicing

[0078] Line segment combination ID Endpoint spacing (px) Distance threshold determination (<10) Direction angle ( ) Angle threshold determination (<30) Final judgment result L-01 4.5 pass 15.0 pass Splicable L-02 12.0 Not approved 5.0 pass No splicing L-03 2.5 pass 45.0 Not approved No splicing L-04 8.1 pass 22.5 pass Splicable

[0079] As shown in Table 2, the combination of L-01 and L-04 simultaneously satisfies the dual constraints of geometric distance and directional consistency, and is identified as the broken part of the same stroke.

[0080] S303: For a set of combinable line segments, aggregate edge segment paths according to the line segment connection order, establish continuous path topology, merge line segments within the same path into a single stroke structure, and generate a set of continuous stroke images constructed by path proximity.

[0081] Construct an undirected connected graph based on the connection relationships in the set of combinable segments. ,in Represents a line segment. Representing splicing relationships; employing a depth-first search (DFS) algorithm to traverse the graph structure and search for the longest path; for line segment pairs determined to be splicable... Call the Cubic Spline Interpolation function to utilize... End and The coordinates and tangent vectors at the beginning are used as control points to generate smooth connection curves that cover the original gaps. All line segments and newly generated interpolation curves under the same connected path are merged, the pixel mask is updated, and the original broken line segment IDs are uniformly replaced with new stroke IDs to complete the reorganization of the topology. All connected components are traversed to output a set of continuous stroke images containing complete stroke shape data.

[0082] Please see Figure 5 The steps to obtain S4 are as follows:

[0083] S401: After obtaining a continuous set of stroke images, detect the direction angle information of each stroke region, call the main layout direction parameter of the image, compare the direction angle of the stroke region with the main layout direction of the image, filter out stroke regions with inconsistent direction angles and perform direction angle adjustment operation to generate a set of stroke images with consistent direction.

[0084] Obtain a set of continuous stroke images, and for each independent stroke region Perform directional feature extraction; construct pixel coordinate covariance matrix Solve for the eigenvector corresponding to its largest eigenvalue to obtain the principal direction angle of the stroke. Preset image main layout direction parameters (For regular stone inscriptions, Set as (i.e., vertical direction); calculate angular deviation. Set the adjustment threshold to If a certain vertical stroke ,but Within the threshold range, construct a two-dimensional rotation matrix. The pixel coordinates of the stroke region are corrected and transformed to make its axis parallel to the main direction; strokes that do not need adjustment (such as horizontal strokes that are orthogonal to the main direction) are left as is; the orientation standardization of all strokes is completed to generate a set of stroke images with consistent orientation.

[0085] S402: For a set of stroke images with consistent orientation, monitor the gray value distribution range of each stroke region, perform mapping transformation on the gray range of each stroke region according to the preset gray mean mapping rule, classify the intensity range of the stroke region into the standard gray channel, and generate a gray-mapped stroke image set.

[0086] For each stroke region in a set of stroke images with consistent orientation, calculate its gray-level histogram to obtain the current gray-level distribution range. For example, the grayscale values ​​of a certain stroke area are distributed in... Between; based on preset grayscale mean mapping rules, the aim is to stretch the grayscale dynamic range to that of a standard channel. For the grayscale value of each pixel within the region Perform linear transformation operations: If the original value of a certain pixel is Then calculate This mapping eliminates the intensity differences caused by varying ink shades in the rubbings, ensuring that all stroke areas possess uniform grayscale statistical characteristics and generating a grayscale mapped stroke image set.

[0087] S403: Based on the consistent direction stroke image set and the grayscale mapping stroke image set, extract the position coordinate information of the corresponding stroke region, perform alignment processing according to the position coordinate relationship, fuse the consistent direction image data and the grayscale mapping image data, establish a unified structural relationship, and generate a stroke image alignment set with unified direction and completed intensity mapping.

[0088] Read the stroke image set with consistent orientation (providing geometric position data) and the grayscale mapped stroke image set (providing pixel intensity data); based on the geometric center of the stroke region. To align anchor points, the enhanced grayscale data is mapped back to a rotation-corrected spatial coordinate system; for areas with overlapping multiple strokes (such as cross intersections), pixel fusion logic is executed, and for coordinates... The gray level comes from stroke A. and the gray scale of stroke B , adopt the maximum value selection strategy , to simulate the ink overlay effect and maintain visual coherence; traverse all strokes in the whole image, complete the unified encapsulation of spatial position and gray scale intensity, and generate a set of aligned stroke images with unified direction and completed intensity mapping.

[0089] Please refer to Figure 6 , the acquisition steps of S5 are as follows:

[0090] S501: After obtaining the set of aligned stroke images with unified direction and completed intensity mapping, extract the starting coordinates and ending coordinates of all stroke paths in the image, count the endpoint distribution density of the stroke paths in each region, and screen the image regions with the potential to be closed according to the starting and ending point density evaluation criteria, and generate a set of candidate closed-loop regions;

[0091] Receive the set of aligned stroke images, and extract the set of endpoint coordinates of all stroke paths in the image; define a sliding window , whose radius pixels; scan within the whole image range and count the number of stroke endpoints in each window ; according to the starting and ending point density evaluation criteria, set the density threshold ; if within a certain window , it indicates that there are multiple stroke ends in this region, and it has the potential to form a closed structure (such as "mouth", "day" shape); for example, when scanning 3 endpoints at the coordinate , determine that this region is a high-potential region; mark all window regions that meet the conditions and extract the circumscribed rectangle range, and generate a set of candidate closed-loop regions.

[0092] S502: Based on the set of candidate closed-loop regions, monitor the connection status of the edge paths in each region, identify whether there are open fracture positions, and according to the edge closure integrity determination rule, remove the path regions with fractured edge structures, and retain the image blocks with closed and continuous structures, and generate a set of closed image blocks;

[0093] For each region in the set of candidate closed-loop regions , perform morphological closure detection; emit multiple rays from the geometric center of the region or perform the flood fill algorithm (Flood Fill), if the filled pixels can extend outside the region bounding box, record the width of the "gap" through which the overflow path passes ; according to the edge closure integrity determination rule, set the fracture tolerance threshold pixels; if it is detected that there is a gap in a certain region and pixels, because , determine that this gap is a non-structural fracture (such as stone flower noise), and execute The closed kernel is used to repair and preserve the region; if If a pixel is identified as a structural opening (such as a non-closed stroke), that region is removed from the set; only image blocks that are ultimately verified as topologically closed are retained to generate a set of closed image blocks.

[0094] S503: For a set of closed image blocks, extract the coordinate point sequence of the outer contour boundary of each block, construct a single continuous closed contour, and call the data of the corresponding coordinate area in the original image to perform image cropping and pixel aggregation to generate a set of inscribed character image data.

[0095] Traverse the set of closed image blocks, extract the ordered coordinate sequence of the outer contour of each block using a contour tracking algorithm (such as Moore-Neighbor Tracing), and construct a closed polygon; calculate the minimum bounding box of this polygon, and expand outward based on this. The buffer distance of pixels determines the final cropping coordinate box. The original high-fidelity inscription image data is called, and a matrix slicing operation is performed based on the cropping coordinate frame to extract the corresponding image sub-blocks. A binary mask is generated using a closed polygon, and a bitwise AND operation is performed with the extracted image sub-blocks to set the background pixels outside the mask to transparent or a specific background color, thereby removing surrounding interference and generating a set of inscription character image data containing a series of independent, background-clean inscription characters.

[0096] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for intelligent recognition of inscribed text images based on deep learning, characterized in that, Includes the following steps: S1: After acquiring the image data of the inscription, the edge regions with obvious gray-scale changes in the image are scanned. The edge trend direction of each sub-region of the image is compared with the extension trend of the adjacent sub-region. The image locations with fracture jump characteristics are selected and an image segmentation set containing edge structure fracture characteristics is generated. S2: Perform multi-size image transformation on the image segmentation region in the image segmentation set containing edge structure fracture features, extract the gray-scale edge connectivity trend of the corresponding region, compare and analyze the edge contour consistency in the multi-size images, retain the image combination with consistent edge trend, and establish the image edge response combination set after size consistency is confirmed. S3: Call the image edge response combination set after the size consistency is confirmed, compare the direction and distance of the start and end positions of the edge line segments in the image, and complete the line segment combination under the condition of satisfying the path proximity relationship to generate a continuous stroke image set constructed by the path proximity. S4: For the continuous stroke image set constructed by path proximity, the stroke direction is compared with the overall arrangement direction and the direction is adjusted. At the same time, the grayscale range of the image is mapped and the direction adjustment result is aligned and fused with the grayscale mapping result to establish a stroke image alignment set with unified direction and completed intensity mapping.

2. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that: The image segmentation set containing edge structure breakage features includes edge breakage region labels, local structural anomaly information, and edge extension direction variation records. The image edge response combination set includes multi-scale edge connectivity description, size consistency verification results, and edge trend direction matching information. The continuous stroke image set includes path connection relationship graph, stroke segment connection information, and edge splicing feasibility identifier. The stroke image alignment set includes orientation normalization image, grayscale mean mapping map, and stroke position registration parameters.

3. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that, The steps for obtaining S1 are as follows: S101: After acquiring the image data of the inscription, monitor the gray-level gradient amplitude value of each pixel within the complete image range. Based on the relationship between the gray-level gradient amplitude value and the gray-level change threshold at each location, filter out pixel locations where the gray-level gradient amplitude value is less than the gray-level change threshold, select all image sub-regions containing the remaining pixel locations, and generate a set of gray-level abrupt change sub-regions. S102: Based on the pixel distribution of each image sub-region in the set of gray-scale abrupt sub-regions, extract the edge gradient vector direction information in the horizontal and vertical directions, obtain the edge gradient vector direction information in adjacent image sub-regions respectively, perform direction angle difference analysis on the edge direction change amplitude of adjacent regions, and filter out image sub-regions with inconsistent edge trend directions according to whether the direction angle difference is greater than the edge extension continuity breakage threshold, and generate a set of edge trend breakage region pairs; S103: For all image sub-region pairs contained in the set of edge trend breakage regions, extract the position coordinate range of each image sub-region, aggregate all pixel regions where edge breakage occurs, and combine all edge breakage regions into multiple segmentation region units according to the spatial connectivity rules in the image coordinate system to generate an image segmentation set containing edge structure breakage features.

4. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that, The steps for obtaining S2 are as follows: S201: After obtaining the image segmentation set containing edge structure fracture features, for each image segmentation region in the set, multiple preset size scaling rules are executed to form multi-size image data frames, and a size mapping relationship between each image segmentation region and the corresponding multi-size image data frame is established to generate a multi-size image region mapping set. S202: Based on the multi-size image region mapping set, extract the gray-scale edge connectivity trend sequence of the corresponding region in each size image data frame, call the gray-scale edge connectivity trend sequence in different size image data frames, compare them one by one according to the edge contour direction consistency judgment benchmark, filter the size combination whose edge extension direction has not shifted, and generate a size combination set with consistent edge trend. S203: For the set of size combinations with consistent edge trends, aggregate edge response data of the same image segmentation region at different sizes, establish the correlation between size identifier and edge response trend, integrate them to form a unified response structure unit, and generate an image edge response combination set.

5. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that, The steps for obtaining S3 are as follows: S301: Call each image in the image edge response combination set after the size consistency is confirmed, detect the start coordinates and end coordinates of all edge line segments in the image, pair and organize the start and end positions of the line segments according to the coordinate index relationship, and generate an edge line segment endpoint pairing set. S302: Based on the edge segment endpoint pairing set, compare the directional proximity relationship between the endpoint direction vector of each segment and the starting direction vector of the adjacent segment, and at the same time determine the relationship between the pixel spacing between the two endpoints and the edge splicing range threshold, filter the segment combinations that meet the directional proximity and spacing compliance, and generate a splicable segment combination set. S303: For the set of splicable line segments, aggregate edge segment paths according to the line segment connection order, establish continuous path topology, merge line segments in the same path into a single stroke structure, and generate a set of continuous stroke images constructed by path proximity.

6. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that, The steps for obtaining S4 are as follows: S401: After obtaining the continuous stroke image set, detect the direction angle information of each stroke region, call the main layout direction parameter of the image, compare the direction angle of the stroke region with the main layout direction of the image, filter the stroke regions with inconsistent direction angles and perform direction angle adjustment operation to generate a stroke image set with consistent direction. S402: For the set of stroke images with consistent direction, monitor the gray value distribution range of each stroke region, perform mapping transformation on the gray range of each stroke region according to the preset gray mean mapping rule, classify the intensity range of the stroke region into the standard gray channel, and generate a gray-scale mapped stroke image set. S403: Based on the set of stroke images with consistent orientation and the set of stroke images with grayscale mapping, extract the position coordinate information of the corresponding stroke regions, perform alignment processing according to the position coordinate relationship, fuse the image data with consistent orientation and the image data with grayscale mapping, establish a unified structural relationship, and generate a set of stroke image alignment with consistent orientation and intensity mapping.

7. The method for intelligent recognition of inscription images based on deep learning according to claim 1, characterized in that, The method further includes: S5: Based on the stroke path information in the stroke image alignment set that is oriented uniformly and has completed intensity mapping, check the edge closure of the image region, extract the character outline boundary in the region that meets the closure condition, and output the inscription character image data set with structural closure. The inscription character image data set includes structurally closed image units, character outline boundary lines, and stroke closure integrity annotations.

8. The method for intelligent recognition of inscription images based on deep learning according to claim 7, characterized in that, The steps for obtaining S5 are as follows: S501: After obtaining the stroke image alignment set with unified direction and completed intensity mapping, extract the start coordinates and end coordinates of all stroke paths in the image, count the endpoint distribution density of stroke paths in each region, and filter image regions with closure potential according to the start and end point density evaluation criteria to generate a candidate closed loop region set. S502: Based on the candidate closed-loop region set, monitor the connection status of the edge paths of each region, identify whether there are opening breakage positions, and according to the edge closure integrity judgment rule, remove the path regions with broken edge structures, retain the image blocks with closed and continuous structures, and generate a closed image block set. S503: For the set of closed image blocks, extract the coordinate point sequence of the outer contour boundary of each block, construct a single continuous closed contour, and call the data of the corresponding coordinate area in the original image to perform image cropping and pixel aggregation to generate a set of inscribed character image data.