Stamp area character recognition method and device and nonvolatile storage medium

By using multi-scale circular convolution kernels and color information processing, the problem of low efficiency in recognizing text in the seal area was solved, achieving accurate recognition of text in the seal area and efficient text image processing.

CN120954020APending Publication Date: 2025-11-14CHINA TELECOM CORP LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511204259.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing technologies cannot effectively recognize text information in the stamp area, resulting in low efficiency in text image processing.

Method used

By performing point-by-point sliding convolution processing on the candidate seal image region using a multi-scale circular convolution kernel group, and combining color information and morphological operations, the text information of the seal region is identified and extracted.

Benefits of technology

It achieves accurate recognition of text in the seal area, improves the efficiency of text image processing, reduces the need for manual verification and supplementary recording, and lowers costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120954020A_ABST
    Figure CN120954020A_ABST
Patent Text Reader

Abstract

The invention discloses a seal area character recognition method and device and a nonvolatile storage medium. The method comprises the following steps: determining a candidate seal image area in an image according to color information of pixel points in the image; point-by-point sliding convolution processing is carried out on the candidate seal image area through a multi-scale annular convolution kernel group, so that a target seal image area is determined in the candidate seal image area, and the multi-scale annular convolution kernel group comprises a plurality of convolution kernels which are of concentric ring structures and have different radius lengths; mapping the target seal image area into a rectangular expanded image, and identifying and extracting a character image to be identified in the rectangular expanded image; and performing identification processing on the character image to be identified to obtain a seal text corresponding to the target seal image area. The technical problem that the text image processing efficiency is low due to the fact that the text information of the seal area cannot be effectively recognized in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition, and more specifically, to a method, apparatus, and non-volatile storage medium for recognizing characters in a seal area. Background Technology

[0002] In related technologies, when recognizing text images, the text information in the stamp area of ​​the image cannot be effectively recognized.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method, apparatus, and non-volatile storage medium for recognizing text in a seal area, so as to at least solve the technical problem of low efficiency in text image processing caused by the inability to effectively recognize text information in a seal area in related technologies.

[0005] According to one aspect of the embodiments of this application, a method for recognizing text in a seal region is provided, comprising: determining a candidate seal image region in an image based on the color information of pixels in an image, wherein the color information includes hue information, saturation information, and brightness information; performing point-by-point sliding convolution processing on the candidate seal image region through a multi-scale circular convolution kernel group to determine a target seal image region in the candidate seal image region, wherein the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric circular structures and different radius lengths; mapping the target seal image region into a rectangular unfolded image, and recognizing and extracting the character image to be recognized in the rectangular unfolded image; and performing recognition processing on the character image to be recognized to obtain the seal text corresponding to the target seal image region.

[0006] Optionally, determining the candidate stamp image region in the image based on the color information of the pixels in the image includes: determining the color distribution information of the pixel color information in the image; determining the initial stamp image region in the image based on the color distribution information; determining a preset stamp color weight vector, and determining candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of the pixels in the initial stamp image region; and determining the candidate stamp image region based on the candidate stamp pixels.

[0007] Optionally, determining candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of the pixels in the initial stamp image region includes: determining the pixel color vector based on the color information of the pixels in the initial stamp image region; calculating the inner product of the pixel color vector and the preset stamp color weight vector, and using the inner product calculation result as the matching degree score of the pixels in the initial stamp image region; and determining the pixels with matching degree scores greater than the preset score as candidate stamp pixels.

[0008] Optionally, determining the candidate stamp image region based on the candidate stamp pixels includes: performing a morphological closing operation on the candidate stamp pixels to obtain multiple connected regions; for each connected region, determining the minimum bounding ellipse of the connected region; and determining the connected region as the candidate stamp image region if the ratio of the major axis to the minor axis of the minimum bounding ellipse is within a preset ratio range and the number of pixels contained in the connected region is greater than a preset number threshold.

[0009] Optionally, determining the target seal image region within the candidate seal image region by performing point-by-point sliding convolution processing on the candidate seal image region using a multi-scale circular convolution kernel group includes: performing point-by-point sliding convolution processing on the candidate seal image region using a multi-scale circular convolution kernel group to obtain a multi-scale response map; determining candidate edge points and a second confidence value for each candidate edge point in the candidate seal image region based on the multi-scale response map, wherein the confidence value is used to reflect the probability that a candidate edge point is an edge point of the target seal image region; determining the target edge point from the candidate edge points based on the second confidence value, and determining the target seal region based on the target edge point.

[0010] Optionally, mapping the target stamp image region into a rectangular unfolded image includes: determining the minimum circumcircle of the target stamp image region; constructing a polar coordinate grid mapping model based on the center and radius of the minimum circumcircle; mapping the target stamp image region to the target plane rectangular coordinate system through the polar coordinate grid mapping model to obtain an initial rectangular unfolded image, wherein the direction of the first coordinate axis in the target plane rectangular coordinate system corresponds to the polar angle dimension in the polar coordinate grid mapping model, the direction of the second coordinate axis in the target plane rectangular coordinate system corresponds to the radius dimension in the polar coordinate grid mapping model, and the edges of the initial rectangular unfolded image are parallel to the first or second coordinate axis; and sampling the initial rectangular unfolded image to obtain the rectangular unfolded image.

[0011] Optionally, sampling the initial rectangular unfolded image to obtain the rectangular unfolded image includes: determining the grayscale value changes of adjacent pixels in the rectangular unfolded image along the first coordinate axis; if the grayscale value change indicates that the grayscale value difference between a consecutive preset number of pixels and adjacent pixels is greater than a first preset difference threshold along the first coordinate axis, then the interpolation step size is reduced to increase the sampling density; if the grayscale value change indicates that the grayscale value difference between a consecutive preset number of pixels and adjacent pixels is less than a second preset difference threshold along the first coordinate axis, then the interpolation step size is increased to reduce the sampling density, wherein the second preset difference threshold is less than the first preset difference threshold; and sampling the initial rectangular unfolded image according to the sampling density to obtain the rectangular unfolded image.

[0012] Optionally, identifying and extracting the character image to be identified in the rectangular unfolded image includes: determining the pixel distribution features in the rectangular unfolded image; dynamically adjusting the size information of the segmentation window based on the pixel distribution features; determining multiple candidate character regions in the rectangular unfolded image through the segmentation window; for each candidate character region, determining the character tilt angle in the candidate character region based on the direction of gray-level gradient change in the candidate character region; and performing radiometric transformation correction processing on the candidate character region based on the character tilt angle to obtain the character image to be identified.

[0013] According to another aspect of the embodiments of this application, a seal region text recognition device is also provided, comprising: a first processing module, configured to determine a candidate seal image region in an image based on the color information of pixels in an image, wherein the color information includes hue information, saturation information, and brightness information; a second processing module, configured to perform point-by-point sliding convolution processing on the candidate seal image region through a multi-scale circular convolution kernel group, thereby determining a target seal image region in the candidate seal image region, wherein the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric circular structures and different radius lengths; a third processing module, configured to map the target seal image region into a rectangular unfolded image, and recognize and extract the character image to be recognized in the rectangular unfolded image; and a fourth processing module, configured to perform recognition processing on the character image to be recognized to obtain the seal text corresponding to the target seal image region.

[0014] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, wherein a program is stored in the non-volatile storage medium, wherein the program controls the device where the non-volatile storage medium is located to execute a seal area character recognition method when it runs.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes a seal area character recognition method during runtime.

[0016] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of a method for recognizing characters in a seal area.

[0017] In this embodiment, candidate seal image regions are determined based on the color information of pixels in the image, where the color information includes hue, saturation, and brightness. A multi-scale circular convolution kernel group is used to perform point-by-point sliding convolution processing on the candidate seal image regions to determine the target seal image region. The multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures of different radius lengths. The target seal image region is mapped to a rectangular unfolded image, and the character image to be recognized is identified and extracted from the rectangular unfolded image. The character image to be recognized is then processed to obtain the seal text corresponding to the target seal image region. By accurately extracting the target seal image region and mapping it to a rectangular unfolded image, and then determining the character to be recognized in the rectangular unfolded image, the aim of accurately extracting the target seal image region and the character to be recognized is achieved. This realizes the technical effect of accurately recognizing the text information in the target seal image region, thereby solving the technical problem of low text image processing efficiency caused by the inability to effectively recognize text information in the seal region in related technologies. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 This is a schematic diagram of the structure of a computer terminal (mobile terminal) according to an embodiment of this application;

[0020] Figure 2 This is a flowchart illustrating an optional method for recognizing characters in a seal area according to an embodiment of this application.

[0021] Figure 3 This is a flowchart illustrating a process for determining a candidate seal image region according to an embodiment of this application.

[0022] Figure 4 This is a flowchart illustrating a process for determining a target seal image region according to an embodiment of this application;

[0023] Figure 5 This is a flowchart illustrating a process for determining a rectangular unfolded image according to an embodiment of this application;

[0024] Figure 6This is a flowchart illustrating a dynamic character segmentation and recognition process according to an embodiment of this application;

[0025] Figure 7 This is a flowchart illustrating a process for recognizing text in a seal image region according to an embodiment of this application.

[0026] Figure 8 This is a schematic diagram of the structure of a seal image region text recognition system according to an embodiment of this application;

[0027] Figure 9 This is a schematic diagram of the structure of a seal image area text recognition device provided according to an embodiment of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0031] HSV color space: A color model composed of Hue, Saturation, and Value, used for color analysis that is closer to human visual perception.

[0032] Hough Circle Transform is a circle detection algorithm based on a voting mechanism that detects circular structures in an image through parameter space mapping.

[0033] Polar Coordinate Expansion Transform is a geometric transformation that maps a circular region to a rectangular image. It is used to handle the linear expansion of circular text.

[0034] Non-Maximum Suppression (NMS) is an algorithm for suppressing non-peak responses in feature detection, used to preserve local maximum feature points.

[0035] Bilinear interpolation is an interpolation method that uses a weighted average of the gray values ​​of adjacent pixels for image scaling and distortion correction.

[0036] Currently, in various office settings, a large amount of paper materials (such as contracts, business application forms, customer correspondence, project acceptance reports, financial vouchers, and other key paper documents) need to be converted into digital archives for management. This can improve operational efficiency, ensure service quality, meet stringent compliance audit requirements, and unlock the value of data.

[0037] The core processes of digital archives management in related technologies rely on document scanning and acquisition, image preprocessing, Optical Character Recognition (OCR), information extraction and classification, storage and retrieval, and workflow integration technologies. Among these, OCR technology is the core step in converting image text into editable and searchable text, forming the foundation for subsequent information extraction and business automation. Despite the widespread application of digital archives management, existing OCR technology still faces a significant challenge when processing various paper-based business documents—the recognition rate for text in the circular seal area drops sharply when there is background interference and the text itself is blurred. This has become a bottleneck restricting the development of digital archives management, specifically manifested in the following ways:

[0038] 1. Circular stamp interference: Key areas of business documents, such as contract terms pages and signature columns of business acceptance forms, often require the affixing of legally valid circular stamps. The red or other dark ink and complex patterns of these stamps directly cover the dense text content below, causing severe background occlusion, color mixing, and text-image overlap, making it difficult for OCR to effectively distinguish between the original text and the stamp text in the covered area.

[0039] 2. Blurred text on the seal: Key text on the seal, such as the full name of the organization, unified social credit code, seal number, and type identification, often becomes blurred, with incomplete strokes and blurred edges due to improper stamping operation, such as uneven pressure or ink problems, physical wear and tear of the seal, and aging of the archives. This makes the text on the seal difficult to identify.

[0040] General-purpose OCR models are primarily designed for clear, clean text. They struggle to overcome strong background interference caused by stamps to accurately identify the covered text, and lack effective mechanisms to recognize blurred or incomplete stamp text. Conventional image preprocessing methods have limited effectiveness in this complex scenario, and may even exacerbate information loss. These issues can lead to the loss of critical information, posing business compliance risks, and potentially disrupting or causing errors in downstream business processes that rely on OCR. This forces companies to invest significant manpower in manual verification and data re-entry, significantly increasing costs and reducing document processing efficiency.

[0041] To address the aforementioned issues, this application provides relevant solutions, which are detailed below.

[0042] According to an embodiment of this application, a method embodiment for recognizing characters in a seal area is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0043] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a method for recognizing characters in a seal area is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0044] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0045] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the seal area character recognition method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned seal area character recognition method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0046] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0047] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0048] Under the aforementioned operating environment, this application provides a method for recognizing characters in a seal area, such as... Figure 2 As shown, the method includes the following steps:

[0049] Step S202: Based on the color information of the pixels in the image, determine the candidate stamp image area in the image, wherein the color information includes hue information, saturation information and brightness information;

[0050] In some embodiments of this application, the image may be document image data containing a circular stamp acquired through an image acquisition device. The image must meet basic clarity and resolution requirements to ensure that subsequent processing steps can effectively extract the visual features of the stamp area. The acquired image contains original RGB or grayscale pixel information, which can provide basic input for subsequent candidate region localization. The image acquisition device may be a scanner, camera, or document import interface, etc. Furthermore, the acquisition of image data must consider the physical state of the document and environmental interference factors. For example, for potential issues such as wrinkles, stains, or uneven lighting in paper documents, preliminary optimization can be performed through automatic exposure adjustment or image denoising algorithms.

[0051] In the technical solution provided in step S202, the step of determining the candidate stamp image region in the image based on the color information of the pixels in the image includes: determining the color distribution information of the pixel color information in the image; determining the initial stamp image region in the image based on the color distribution information; determining a preset stamp color weight vector, and determining candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of the pixels in the initial stamp image region; and determining the candidate stamp image region based on the candidate stamp pixels.

[0052] As an optional implementation, the step of determining candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of the pixels in the initial stamp image region includes: determining the pixel color vector based on the color information of the pixels in the initial stamp image region; calculating the inner product of the pixel color vector and the preset stamp color weight vector, and using the inner product calculation result as the matching degree score of the pixels in the initial stamp image region; and determining the pixels with a matching degree score greater than the preset score as candidate stamp pixels.

[0053] In some embodiments of this application, the step of determining the candidate stamp image region based on the candidate stamp pixels includes: performing a morphological closing operation on the candidate stamp pixels to obtain multiple connected regions; for each connected region, determining the minimum bounding ellipse of the connected region; and determining the connected region as the candidate stamp image region when the ratio of the major axis to the minor axis of the minimum bounding ellipse is within a preset ratio range and the number of pixels contained in the connected region is greater than a preset number threshold.

[0054] In some embodiments of this application, the process for determining candidate stamp image regions is as follows: Figure 3 As shown. From Figure 3 As can be seen, the process of obtaining candidate seal image regions includes:

[0055] The first step involves extracting a set of pixels from the image that are highly correlated with the color distribution of the preset seal, based on a color feature matching algorithm. The image data is converted from RGB to HSV color space, and the hue (H), saturation (S), and lightness (V) parameters of each pixel are extracted to generate a three-dimensional color histogram. This quantifies the color distribution pattern and distinguishes the color difference between the seal and the background. Using this three-dimensional color histogram, the image regions where the seal image might exist can be preliminarily identified, which is the initial seal image region.

[0056] Optionally, there is usually a significant difference between the color of the stamp image and the background color. The colors of the pixels belonging to the stamp image are similar or the same, and the colors of the pixels belonging to the background image are also similar or the same. Furthermore, the number of pixels in the stamp image is usually less than the number of pixels in the background. Therefore, a 3D color histogram can be used to visually confirm the color distribution information of the pixels, thereby initially identifying image areas where stamp images may exist and reducing the computational burden.

[0057] The second step involves determining a preset seal color weight vector based on historical seal image samples. This vector contains three-dimensional weight coefficients. A matching score is then generated by calculating the inner product of the pixel color vector (including the pixel's HSV parameters) and the weight vector for each pixel in the initial seal image region. A higher score indicates that the pixel's color is closer to the target seal. This matching score is then compared to a preset threshold, and pixels with scores greater than or equal to the threshold are selected to form a candidate pixel set, thus eliminating interference areas with large color differences.

[0058] The third step involves comparing the matching score of each pixel with a preset color matching threshold, filtering out pixels with scores greater than or equal to the threshold to form a candidate pixel set. The preset color matching threshold is dynamically set based on the contrast between the stamp color and the background in the actual scene. For example, in low-contrast scenes, the threshold can be appropriately lowered to retain more potential stamp pixels. Threshold filtering initially eliminates interfering areas in the document that differ significantly from the stamp color, providing a highly relevant pixel set for subsequent region connectivity analysis. Interfering areas include black text or white backgrounds.

[0059] In the HSV color space matching section, let the pixel color vector of a pixel be v. i =[H i S i V i ] T The preset seal color weight vector is w = [w H w S w V ] T Then the matching score s i The calculation is as follows:

[0060] s i =w T v i =w H H i +w s S i +w V V i

[0061] Among them, s i ≥τ c (τ c Pixels that meet the color matching threshold are identified as candidate stamp pixels.

[0062] The fourth step is to perform morphological closing operations (such as a 3×3 circular kernel) on the candidate pixel set to connect discrete pixels into continuous regions, preserve the integrity of the stamp edge, and generate several connected regions.

[0063] Optionally, for each connected region, the lengths of the major and minor axes of the minimum circumscribed ellipse and the pixel area of ​​the connected region can be calculated: the major and minor axes are obtained by fitting the minimum circumscribed ellipse and represent the shape ratio; the pixel area is the total number of pixels in the region and measures the size of the region.

[0064] The system presets the range of major axis / minor axis ratio (e.g., 1.0 to 1.2) and area threshold. If the axis ratio of a connected region is within this range and the area is greater than the threshold, it is determined to be a candidate stamp image region. Non-stamp interference such as decorative dots is eliminated through dual geometric constraints, and a set of high-confidence candidate regions is output.

[0065] Step S204: The candidate seal image region is determined by point-by-point sliding convolution processing through a multi-scale circular convolution kernel group. The multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures and different radius lengths.

[0066] In the technical solution provided in step S204, the step of determining the target seal image region in the candidate seal image region by performing point-by-point sliding convolution processing on the candidate seal image region through a multi-scale circular convolution kernel group includes: performing point-by-point sliding convolution processing on the candidate seal image region through a multi-scale circular convolution kernel group to obtain a multi-scale response map; determining candidate edge points in the candidate seal image region based on the multi-scale response map, and a second confidence value for each candidate edge point, wherein the confidence value is used to reflect the probability that the candidate edge point is an edge point of the target seal image region; determining the target edge point from the candidate edge points based on the second confidence value, and determining the target seal region based on the target edge point.

[0067] In some embodiments of this application, to accurately determine the authenticity of candidate regions and identify target seal image regions, a multi-scale concentric ring convolution kernel group covering different ring spacings can be constructed first. Layer-by-layer convolution operations are then performed on the candidate regions to generate multi-scale response maps. Next, key response peaks are extracted using non-maximum suppression, the spatial distribution density of peak points is statistically analyzed and compared with a preset threshold, quantifying the degree of matching between the candidate region and the ideal seal edge. The seal edge confidence parameter is then calculated to filter out real seal regions, thereby providing a verification basis for polar coordinate transformation.

[0068] Optionally, the process of determining the confidence parameters of the seal edge is as follows: Figure 4 As shown, it includes the following steps:

[0069] The first step involves constructing a multi-scale circular convolutional kernel group based on image data from candidate stamp image regions. This group comprises multiple kernels with concentric ring structures, where the ring spacing decreases progressively according to a preset gradient ratio to cover ring texture patterns of varying thicknesses. Optionally, the preset gradient ratio is pre-set based on the expected blur level and size range of the stamp edges, for example, by decreasing the ring spacing sequentially in a geometric progression. This allows kernels with larger ring spacing to detect wider ring edges, while kernels with smaller ring spacing focus on finer textures. The ring width and spacing parameters of each kernel are calibrated based on the edge features of actual stamp samples, ensuring they match the ring texture distribution patterns of real stamps and thus enhancing adaptability to stamp edges with varying degrees of blur.

[0070] The second step is to use a multi-scale convolution kernel group to perform point-by-point sliding convolution on the candidate region to generate ring response intensity maps (i.e., multi-scale response maps) at each scale. The higher the response value, the higher the matching degree between the location and the ring texture at the corresponding scale.

[0071] The formula for calculating the response intensity of a multi-scale circular convolution kernel is expressed as follows:

[0072]

[0073] Where I is the input image matrix of the candidate stamp image region, which is a two-dimensional grayscale image matrix, and the element values ​​in the matrix are pixel grayscale values ​​(e.g., 0-255); K k Let K be the circular convolution kernel matrix at the k-th scale, with a concentric ring structure. The center of the convolution kernel is the geometric center of the rings. The ring spacing (the radial distance between adjacent rings) decreases according to a preset gradient ratio. The weight values ​​of the convolution kernel are positive on the rings and 0 or negative in non-ring regions (used to suppress non-ring textures); (I,J) represents the convolution kernel K. k Local coordinate index; R k(x, y) represents the convolution response intensity value at image location (x, y) at the k-th scale. A larger value indicates a higher degree of matching between this location and the ring texture features at the current scale. k is the scale index of the convolution kernel, corresponding to convolution kernels with different ring spacing, used to detect ring edges of varying thickness. In this way, by using convolution kernels of different scales, the blurring, breaks, or size variations that may exist at the edge of the stamp can be covered, improving the adaptability to complex textures.

[0074] The third step involves determining the spatial distribution density parameters of peak points in the candidate stamp image region based on the multi-scale response map, and determining the deviation of these parameters from a preset density threshold. This allows for the calculation of the stamp edge confidence parameters for the candidate stamp image region. Optionally, the preset density threshold is pre-calibrated based on the annular texture features of real stamp samples, including a minimum peak point density and a maximum distribution dispersion threshold. If the peak point density in the density distribution parameters of the candidate stamp image region is greater than or equal to the minimum density threshold, and the distribution dispersion is less than or equal to the maximum dispersion threshold, then its annular texture distribution is determined to conform to the features of a real stamp. Furthermore, the stamp edge confidence parameters can be determined by mapping the density parameters to values ​​in the 0,1 range using a normalization formula. A higher confidence parameter value indicates a greater probability that the pixel is a real stamp edge pixel. Therefore, the confidence parameters can be used to filter high-confidence stamp edge pixels. The edges of the target stamp image region are then determined based on the filtered high-confidence stamp edge pixels, and subsequently, the target stamp image region is determined based on these edges.

[0075] The formula for calculating the confidence parameter of the seal edge is expressed as follows:

[0076]

[0077] Where, N peak is the total number of significant response peaks identified by the non-maximum suppression algorithm after detection using multi-scale circular convolution kernels within the candidate region. It represents the number of pixels in the candidate region that conform to the circular texture feature; a larger value indicates a more prominent circular edge. A is the area of ​​the candidate stamp image region (in pixels), reflecting the spatial scale of the candidate region and used to normalize the peak density. N Peak / A represents the peak response density per unit area, quantifying the density of the ring texture distribution in the candidate region. Higher density increases the likelihood of a true stamp edge. β is a preset density baseline threshold used to determine whether the candidate region conforms to the ring texture distribution pattern of a true stamp. α is the density sensitivity coefficient, controlling the rate of change of confidence as the density deviates from the baseline threshold β. c is the stamp edge confidence parameter, ranging from [0,1].

[0078] Optionally, the linear relationship between density and threshold can be mapped to a probability value using the Sigmoid function, where c≈1 indicates that the candidate region is highly likely to be a genuine stamp, and c≈0 indicates that it is highly likely to be a interference region. This formula, by comparing density statistics with the threshold and combining nonlinear mapping, can effectively distinguish between genuine stamps and interference regions, improving the robustness of the detection system.

[0079] In summary, this step covers different annular texture features by using multi-scale convolutional kernel groups, and combines peak point density statistics with threshold comparison to accurately calculate confidence parameters, thereby improving the accuracy of stamp region detection in complex backgrounds, reducing false detection rate, and providing highly reliable input for subsequent processing.

[0080] Step S206: Map the target seal image area into a rectangular unfolded image, and identify and extract the character image to be identified in the rectangular unfolded image;

[0081] In the technical solution provided in step S206, the step of mapping the target seal image region into a rectangular unfolded image includes: determining the minimum circumcircle of the target seal image region; constructing a polar coordinate grid mapping model based on the center and radius of the minimum circumcircle; mapping the target seal image region to the target plane rectangular coordinate system through the polar coordinate grid mapping model to obtain an initial rectangular unfolded image, wherein the direction of the first coordinate axis in the target plane rectangular coordinate system corresponds to the polar angle dimension in the polar coordinate grid mapping model, the direction of the second coordinate axis in the target plane rectangular coordinate system corresponds to the radius dimension in the polar coordinate grid mapping model, and the edge of the initial rectangular unfolded image is parallel to the first coordinate axis or the second coordinate axis; and sampling the initial rectangular unfolded image to obtain a rectangular unfolded image.

[0082] In some embodiments of this application, the step of sampling an initial rectangular unfolded image to obtain a rectangular unfolded image includes: determining the grayscale value changes of adjacent pixels in the rectangular unfolded image along a first coordinate axis; if the grayscale value change indicates that the grayscale value difference between a consecutive preset number of pixels and adjacent pixels is greater than a first preset difference threshold along the first coordinate axis, then reducing the interpolation step size to increase the sampling density; if the grayscale value change indicates that the grayscale value difference between a consecutive preset number of pixels and adjacent pixels is less than a second preset difference threshold along the first coordinate axis, then increasing the interpolation step size to decrease the sampling density, wherein the second preset difference threshold is less than the first preset difference threshold; and sampling the initial rectangular unfolded image according to the sampling density to obtain the rectangular unfolded image.

[0083] In some embodiments of this application, such as Figure 5As shown, a polar coordinate grid mapping model can be constructed first based on the geometric center and radius of the target seal image region to convert the circular text into a linearly distributed rectangular image, eliminating character topological distortion. Next, the gray-level gradient directions of adjacent pixels in the unfolded image are analyzed, and the bilinear interpolation step size is dynamically adjusted to compensate for radial and tangential distortion, ensuring uniform distribution of character strokes. Then, a preset sharpening kernel is used to enhance the text edges, and a contrast equalization algorithm is used to eliminate uneven lighting, generating a clear and uniform unfolded image. Figure 5 As can be seen from this, the steps to determine the unfolded rectangular image include:

[0084] The first step involves calculating the geometric center coordinates of the target stamp image region as the center coordinates for polar coordinate transformation when the confidence parameter of the stamp edge is greater than or equal to a preset confidence threshold. This calculation is based on the geometric shape parameters of the target stamp image region (including the radius of the smallest circumscribed circle and the pixel area of ​​the target stamp image region). The radius range is determined according to the smallest circumscribed circle parameter of the candidate circular stamp region, specifically the maximum radial distance from the center to the outer edge of the annular region. The preset confidence threshold is pre-calibrated based on the annular texture distribution pattern of historical samples and is used to filter candidate regions that conform to the characteristics of real stamps, avoiding invalid transformations on low-confidence regions.

[0085] The second step involves constructing a polar coordinate grid mapping model based on the center coordinates and radius range. Optionally, the center can be used as the pole, and the polar angle can be divided radially with a preset angular resolution (e.g., 2 degrees), while the radius step can be divided radially with a preset radial resolution, generating a polar coordinate grid covering the candidate circular stamp area. Using the polar coordinate grid mapping model, pixels within the annular area are mapped to the horizontal (polar angle dimension) and vertical (radius dimension) coordinates of the unfolded rectangular image according to the polar angle and radius parameters, generating an initial unfolded rectangular image. The preset angular resolution and radial resolution can be dynamically adjusted according to the minimum character size of the stamp text to ensure complete preservation of text details.

[0086] The third step involves adjusting the interpolation step size parameter of the bilinear interpolation algorithm based on the gray-level gradient directions of adjacent pixels in the initial rectangular unfolded image to reduce geometric distortion during circular unfolding. Specifically, the gray-level gradient directions of adjacent pixels are analyzed along the polar angle direction. If the gradient direction indicates radial stretching distortion (i.e., drastic gray-level changes in adjacent pixels), the interpolation step size is dynamically reduced to increase the sampling density. If the gradient direction indicates tangential compression distortion (i.e., gradual gray-level changes), the interpolation step size is increased to reduce redundant sampling. By adaptively adjusting the interpolation step size, a distortion-corrected intermediate unfolded image is generated, ensuring a uniform distribution of text strokes in the horizontal dimension and reducing the impact of character deformation on subsequent segmentation.

[0087] The fourth step involves performing edge sharpening and brightness correction on the intermediate unfolded image based on a preset sharpening kernel (such as the Laplacian operator) and contrast equalization coefficient. The sharpening kernel enhances high-frequency components of the image, highlighting the detailed features of the text edges. The contrast equalization coefficient is dynamically calculated based on the overall grayscale histogram of the image, used to stretch the grayscale distribution range and eliminate locally dark or bright areas caused by uneven lighting. After sharpening and contrast adjustment, a rectangular unfolded image with clear edges and uniform brightness is generated, providing high-quality input data for subsequent character segmentation and recognition. The preset sharpening kernel size and contrast equalization coefficient are pre-calibrated based on the stroke width and background complexity of typical seal text to ensure that the processing effect adapts to different imaging conditions.

[0088] As an optional implementation, the steps of identifying and extracting the character image to be identified in a rectangular unfolded image include: determining the pixel distribution features in the rectangular unfolded image; dynamically adjusting the size information of the segmentation window based on the pixel distribution features; determining multiple candidate character regions in the rectangular unfolded image through the segmentation window; for each candidate character region, determining the character tilt angle in the candidate character region based on the direction of gray-level gradient change in the candidate character region; and performing radiometric transformation correction processing on the candidate character region based on the character tilt angle to obtain the character image to be identified.

[0089] Step S208: Perform recognition processing on the character image to be recognized to obtain the seal text corresponding to the target seal image area.

[0090] In some embodiments of this application, a dynamic character segmentation algorithm can be used to segment and recognize characters in a rectangular unfolded image after polar coordinate transformation, ultimately outputting the seal text content. First, based on the lateral pixel distribution features of the unfolded image, a projection histogram is generated to analyze the character spacing patterns. The segmentation window size is dynamically adjusted by the valley point distribution density to adapt to changes in character width, achieving accurate character bounding box localization. Subsequently, for the segmented candidate character regions, the character tilt angle is detected by the grayscale gradient direction, and affine transformation correction is performed to generate a normalized character image, providing standardized input for subsequent recognition.

[0091] In the recognition stage, normalized characters are input into a pre-trained rotation-invariant character recognition model. This model learns rotation-invariant features through adversarial training, effectively overcoming the character angle differences caused by circular arrangement. Based on the circular arrangement order of the unfolded image, the recognition results of each character are recombined to restore the original semantic logic of the seal text and output the complete text content.

[0092] In some embodiments of this application, the dynamic character segmentation and recognition process is as follows: Figure 6 As shown, it includes:

[0093] The first step is to calculate the cumulative gray values ​​of each column of pixels along the horizontal direction based on the horizontal pixel distribution of the rectangular unfolded image, and generate a horizontal projection histogram. The horizontal axis corresponds to the horizontal dimension of the unfolded image (the polar angle direction of the original annular region), and the vertical axis is the cumulative gray intensity of each column of pixels. The peak region represents the concentrated position of character strokes, and the trough region reflects the gap between characters, providing an initial basis for character segmentation.

[0094] The second step is to dynamically adjust the sliding window size parameters based on the distribution density of the trough points in the projection histogram. This is done by detecting the position of the trough points and statistically analyzing the distribution pattern of the distance between adjacent trough points. If the trough points are dense (small character spacing), the window size is reduced; if they are sparse (large character spacing), the window size is increased. The adjustment range is determined by a preset character width threshold based on historical sample statistics.

[0095] The third step involves generating candidate character bounding boxes by sliding the window horizontally along the expanded image, starting from the trough point, according to the adjusted sliding window size. If the bounding boxes of adjacent windows overlap, the confidence level is calculated based on the sum of the gray-level gradient magnitudes of the pixels within the bounding box using a non-maximum suppression algorithm. High-confidence bounding boxes are then selected to avoid redundant segmentation.

[0096] The fourth step is to calculate the horizontal and vertical grayscale gradient components within the bounding box of each candidate character, statistically analyze the gradient direction histogram distribution, and use the angle corresponding to the peak value of the histogram as the main tilt angle of the character. If multiple peaks are present, the comprehensive angle is calculated by weighted average to ensure the accuracy of tilt correction.

[0097] The fifth step involves performing an affine transformation on the candidate character images based on the character tilt angle. The rotation angle is set to the negative of the tilt angle to correct it to the horizontal direction. The scaling factor is dynamically adjusted according to the preset character height threshold to make all character images have the same height, generating a normalized character image that retains the original stroke topology and eliminates deformation.

[0098] The sixth step is to input the normalized character image into the pre-trained rotation-invariant character recognition model. This model is built on a two-branch convolutional neural network and optimized through adversarial training strategy so that the feature extraction branch is invariant to the character rotation angle. It outputs the character category label and confidence score.

[0099] The seventh step involves sequentially piecing together the character recognition results according to the circular arrangement of the rectangular unfolded image, based on the horizontal coordinates of the bounding boxes of each candidate character in the unfolded image (polar angle from 0 degrees to 360 degrees), restoring the semantic logic of the seal text, and generating the complete text content.

[0100] According to an embodiment of this application, a method such as... is also provided. Figure 7 The text recognition process for the stamp image region shown. From Figure 7 As can be seen from this, the process includes the following steps:

[0101] The first step is to acquire the image data of the document to be recognized;

[0102] The second step is to locate candidate stamp areas based on the visual features of the image data.

[0103] The third step is to perform multi-scale ring texture analysis on the candidate seal area to generate seal edge confidence parameters.

[0104] The fourth step is to perform polar coordinate unfolding transformation on the candidate circular seal area when the confidence parameter of the seal edge meets the preset verification conditions, and generate an annular text unfolding image.

[0105] The above-mentioned circular text expansion image is a rectangular text expansion image.

[0106] The fifth step involves using a dynamic character segmentation algorithm to segment and recognize characters in the expanded circular text image, and then outputting the seal text content.

[0107] By employing color information from pixels in an image to determine candidate stamp image regions, including hue, saturation, and brightness information, and then performing point-by-point sliding convolution processing on these candidate stamp image regions using a multi-scale circular convolution kernel group (which includes multiple convolution kernels with concentric ring structures of different radii), the target stamp image region is determined. The target stamp image region is mapped to a rectangular unfolded image, and the character image to be recognized is identified and extracted from this image. The character image is then processed to obtain the stamp text corresponding to the target stamp image region. This method, by accurately extracting the target stamp image region, mapping it to a rectangular unfolded image, and then identifying the character within that image, achieves the goal of accurately extracting both the target stamp image region and the character to be recognized. This effectively solves the technical problem of low text image processing efficiency caused by the inability to effectively recognize text information in stamp regions in related technologies.

[0108] To verify the effectiveness of the method provided in this application for recognizing text in a seal image region, in an exemplary embodiment, 150 typical document images containing circular seals were selected and evenly divided into three categories according to the degree of interference: 50 images with mild interference (seal covering <20% of text, clear font), 50 images with moderate interference (20% ≤ coverage <50%, slightly blurred font), and 50 images with severe interference (coverage ≥50%, severely blurred font). All images were labeled with real text content as a baseline, covering common circular seal types such as company seals and contract seals. Then, three mainstream deep learning-based methods were selected as a comparison group:

[0109] Comparison Method 1: YOLOv5-based stamp detection + CRNN-based text recognition;

[0110] Comparison Method 2: Stamp region segmentation based on U-Net + text recognition based on PaddleOCR;

[0111] Comparison Method 3: Image-text generation models based on pre-trained Transformer models (such as ViT).

[0112] In the comparison process, text recognition accuracy (number of correctly recognized characters / total number of characters), seal detection recall (number of correctly detected seals / actual number of seals), and average processing time per image (unit: ms) were used as the core evaluation indicators.

[0113] Ultimately, in terms of text recognition accuracy, under mild interference scenarios, the method provided in this application embodiment and the comparative methods perform similarly, all maintaining a high level of recognition. However, under moderate and severe interference scenarios (severe seal coverage + blurred fonts), the accuracy of the method provided in this application embodiment is 10-20 percentage points higher than that of the comparative methods, indicating that it has better anti-interference ability under strong interference through multi-scale ring texture analysis and adaptive distortion correction strategy.

[0114] Regarding the detection recall rate, the method provided in this application demonstrates a higher recall rate for seal detection than the comparative methods in various interference scenarios, especially in heavily interfered scenarios (15-20 percentage points higher). This indicates that the positioning strategy based on dual constraints of HSV color matching and geometric features is more adaptable to blurred and obscured seals.

[0115] In terms of processing efficiency, the single-image processing time of the method provided in this application embodiment is only 1 / 2 to 1 / 3 of that of deep learning methods. It can run efficiently on ordinary workstations without GPU acceleration, and is more suitable for the deployment needs of low-configuration equipment in grassroots network points of operators.

[0116] This application provides an embodiment of, as follows: Figure 8 The illustrated seal area character recognition system includes an image acquisition device 80, a processing device 82, and a computing device 84. The image acquisition device can be a scanner, camera, mobile terminal, or other device with image acquisition capabilities. It can output images that meet preset requirements, such as a resolution of at least 300 dpi, in RGB or HSV format, or as grayscale images.

[0117] The processing device 82 may include multiple software functional modules, such as an image preprocessing module 820 for noise reduction and brightness equalization, a stamp recognition module 822 for locating candidate regions, performing multi-scale texture analysis on the candidate regions to determine the stamp region, expanding the stamp region into a rectangular region using polar coordinate transformation, and performing dynamic character segmentation and recognition on the rectangular region. A template management module 824 is used to manage and store the template library, perform text similarity calculations, and assist in the execution of manual review processes.

[0118] The computing device 84 can be an electronic device with GPU acceleration capabilities, such as a server or workstation. The computing device 84 can be used to store the final identification results of the processing device 82 and to provide computing power support for the processing device 82.

[0119] This application provides a device for recognizing characters in a seal area. Figure 9 This is a schematic diagram of the device. From... Figure 9 As can be seen from the diagram, the device includes: a first processing module 90, used to determine candidate stamp image regions in the image based on the color information of pixels in the image, wherein the color information includes hue information, saturation information, and brightness information; a second processing module 92, used to perform point-by-point sliding convolution processing on the candidate stamp image regions through a multi-scale circular convolution kernel group, thereby determining the target stamp image region in the candidate stamp image regions, wherein the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures and different radius lengths; a third processing module 94, used to map the target stamp image region into a rectangular unfolded image, and to identify and extract the character image to be identified in the rectangular unfolded image; and a fourth processing module 96, used to perform recognition processing on the character image to be identified, to obtain the stamp text corresponding to the target stamp image region.

[0120] In some embodiments of this application, the step of the first processing module 90 determining a candidate stamp image region in an image based on the color information of pixels in the image includes: determining the color distribution information of the pixel color information in the image; determining an initial stamp image region in the image based on the color distribution information; determining a preset stamp color weight vector, and determining candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of pixels in the initial stamp image region; and determining a candidate stamp image region based on the candidate stamp pixels.

[0121] In some embodiments of this application, the first processing module 90 determines candidate stamp pixels from the pixels in the initial stamp image region based on the preset stamp color weight vector and the color information of the pixels in the initial stamp image region. The steps include: determining the pixel color vector based on the color information of the pixels in the initial stamp image region; performing an inner product calculation on the pixel color vector and the preset stamp color weight vector, and using the inner product calculation result as the matching degree score of the pixels in the initial stamp image region; and determining the pixels with a matching degree score greater than the preset score as candidate stamp pixels.

[0122] In some embodiments of this application, the first processing module 90 determines the candidate stamp image region based on the candidate stamp pixels by performing a morphological closing operation on the candidate stamp pixels to obtain multiple connected regions; for each connected region, the minimum bounding ellipse of the connected region is determined; and if the ratio of the major axis to the minor axis of the minimum bounding ellipse is within a preset ratio range and the number of pixels contained in the connected region is greater than a preset number threshold, the connected region is determined as a candidate stamp image region.

[0123] In some embodiments of this application, the second processing module 92 performs point-by-point sliding convolution processing on the candidate stamp image region using a multi-scale circular convolution kernel group to determine the target stamp image region. The steps include: performing point-by-point sliding convolution processing on the candidate stamp image region using a multi-scale circular convolution kernel group to obtain a multi-scale response map; determining candidate edge points and a second confidence value for each candidate edge point in the candidate stamp image region based on the multi-scale response map, wherein the confidence value is used to reflect the probability that the candidate edge point is an edge point of the target stamp image region; determining the target edge point from the candidate edge points based on the second confidence value, and determining the target stamp region based on the target edge point.

[0124] In some embodiments of this application, the step of the third processing module 94 mapping the target stamp image region into a rectangular unfolded image includes: determining the minimum circumcircle of the target stamp image region; constructing a polar coordinate grid mapping model based on the center and radius of the minimum circumcircle; mapping the target stamp image region to the target plane rectangular coordinate system through the polar coordinate grid mapping model to obtain an initial rectangular unfolded image, wherein the direction of the first coordinate axis in the target plane rectangular coordinate system corresponds to the polar angle dimension in the polar coordinate grid mapping model, the direction of the second coordinate axis in the target plane rectangular coordinate system corresponds to the radius dimension in the polar coordinate grid mapping model, and the edge of the initial rectangular unfolded image is parallel to the first coordinate axis or the second coordinate axis; and sampling the initial rectangular unfolded image to obtain a rectangular unfolded image.

[0125] In some embodiments of this application, the third processing module 94 performs sampling processing on the initial rectangular unfolded image to obtain the rectangular unfolded image. The steps include: determining the gray value changes of adjacent pixels in the rectangular unfolded image along the first coordinate axis; if the gray value change indicates that the gray value difference between a consecutive preset number of pixels and adjacent pixels is greater than a first preset difference threshold along the first coordinate axis, then the interpolation step size is reduced to increase the sampling density; if the gray value change indicates that the gray value difference between a consecutive preset number of pixels and adjacent pixels is less than a second preset difference threshold along the first coordinate axis, then the interpolation step size is increased to reduce the sampling density, wherein the second preset difference threshold is less than the first preset difference threshold; and performing sampling processing on the initial rectangular unfolded image according to the sampling density to obtain the rectangular unfolded image.

[0126] In some embodiments of this application, the steps of the third processing module 94 in recognizing and extracting the character image to be recognized in the rectangular unfolded image include: determining the pixel distribution features in the rectangular unfolded image; dynamically adjusting the size information of the segmentation window based on the pixel distribution features; determining multiple candidate character regions in the rectangular unfolded image through the segmentation window; for each candidate character region, determining the character tilt angle in the candidate character region based on the gray-level gradient change direction in the candidate character region; and performing radiometric transformation correction processing on the candidate character region based on the character tilt angle to obtain the character image to be recognized.

[0127] It should be noted that each module in the above-mentioned seal area character recognition device can be a program module (for example, a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.

[0128] According to an embodiment of this application, a non-volatile storage medium is also provided, which stores a program. When the program runs, it controls the device containing the non-volatile storage medium to execute the following method for recognizing characters in a seal area: Based on the color information of pixels in an image, a candidate seal image area is determined in the image, wherein the color information includes hue information, saturation information, and brightness information; a multi-scale circular convolution kernel group is used to perform point-by-point sliding convolution processing on the candidate seal image area, thereby determining the target seal image area within the candidate seal image area; the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures and different radius lengths; the target seal image area is mapped to a rectangular unfolded image, and the character image to be recognized is identified and extracted from the rectangular unfolded image; the character image to be recognized is processed to obtain the seal text corresponding to the target seal image area.

[0129] According to an embodiment of this application, an electronic device is also provided, including: a memory and a processor. The processor is used to run a program stored in the memory, wherein the program executes the following method for recognizing characters in a seal area: determining candidate seal image areas in an image based on the color information of pixels in the image, wherein the color information includes hue information, saturation information, and brightness information; performing point-by-point sliding convolution processing on the candidate seal image areas through a multi-scale circular convolution kernel group, thereby determining a target seal image area in the candidate seal image areas, wherein the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric circular structures and different radius lengths; mapping the target seal image area into a rectangular unfolded image, and recognizing and extracting the character image to be recognized in the rectangular unfolded image; performing recognition processing on the character image to be recognized to obtain the seal text corresponding to the target seal image area.

[0130] According to an embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the following steps of a method for recognizing characters in a seal area: determining candidate seal image areas in an image based on the color information of pixels in the image, wherein the color information includes hue information, saturation information, and brightness information; performing point-by-point sliding convolution processing on the candidate seal image areas using a multi-scale circular convolution kernel group, thereby determining a target seal image area in the candidate seal image areas, wherein the multi-scale circular convolution kernel group includes multiple convolution kernels with concentric circular structures and different radius lengths; mapping the target seal image area into a rectangular unfolded image, and recognizing and extracting the character image to be recognized in the rectangular unfolded image; performing recognition processing on the character image to be recognized to obtain the seal text corresponding to the target seal image area.

[0131] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0132] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0133] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0135] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0136] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for recognizing characters in a seal area, characterized in that, include: Based on the color information of pixels in the image, candidate stamp image regions are determined in the image, wherein the color information includes hue information, saturation information and brightness information; The candidate seal image region is determined by performing point-by-point sliding convolution processing on the candidate seal image region through a multi-scale circular convolution kernel group. The multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures and different radius lengths. The target seal image region is mapped into a rectangular unfolded image, and the character image to be identified is identified and extracted from the rectangular unfolded image; The character image to be identified is processed to obtain the seal text corresponding to the target seal image area.

2. The seal area character recognition method according to claim 1, characterized in that, Based on the color information of pixels in the image, the candidate seal image region is determined in the image as follows: Determine the color distribution information of the pixels in the image; The initial stamp image area is determined in the image based on the color distribution information; A preset seal color weight vector is determined, and candidate seal pixels are determined from the pixels in the initial seal image area based on the preset seal color weight vector and the color information of the pixels in the initial seal image area. The candidate seal image region is determined based on the candidate seal pixels.

3. The seal area character recognition method according to claim 2, characterized in that, Based on the preset seal color weight vector and the color information of the pixels in the initial seal image region, determining candidate seal pixels from the pixels in the initial seal image region includes: The pixel color vector is determined based on the color information of the pixels in the initial stamp image area; The inner product of the pixel color vector and the preset seal color weight vector is calculated, and the inner product calculation result is used as the matching degree score of the pixel in the initial seal image region. The pixels whose matching score is greater than a preset score are identified as candidate stamp pixels.

4. The seal area character recognition method according to claim 2, characterized in that, Determining the candidate seal image region based on the candidate seal pixels includes: Perform morphological closing operations on the candidate stamp pixels to obtain multiple connected regions; For each of the connected regions, determine the minimum bounding ellipse of the connected region; If the ratio of the major axis to the minor axis of the minimum circumscribed ellipse is within a preset ratio range, and the number of pixels contained in the connected region is greater than a preset threshold, then the connected region is determined to be the candidate stamp image region.

5. The method for recognizing characters in a seal area according to claim 1, characterized in that, The candidate seal image region is determined by performing point-by-point sliding convolution processing on the candidate seal image region using a multi-scale circular convolution kernel group, thereby including: The candidate stamp image region is subjected to point-by-point sliding convolution processing by a multi-scale circular convolution kernel group to obtain a multi-scale response map. Candidate edge points are determined in the candidate stamp image region based on the multi-scale response map, and a second confidence value is obtained for each candidate edge point, wherein the confidence value is used to reflect the probability that the candidate edge point is an edge point of the target stamp image region; The target edge point is determined from the candidate edge points based on the second confidence value, and the target stamp area is determined based on the target edge point.

6. The method for recognizing characters in a seal area according to claim 1, characterized in that, Mapping the target stamp image region into a rectangular unfolded image includes: Determine the minimum circumcircle of the target seal image region; A polar coordinate mesh mapping model is constructed based on the center and radius of the minimum circumcircle; The target stamp image region is mapped to the target Cartesian coordinate system using the polar coordinate grid mapping model to obtain an initial rectangular unfolded image. The direction of the first coordinate axis in the target Cartesian coordinate system corresponds to the polar angle dimension in the polar coordinate grid mapping model, and the direction of the second coordinate axis in the target Cartesian coordinate system corresponds to the radius dimension in the polar coordinate grid mapping model. The edges of the initial rectangular unfolded image are parallel to the first coordinate axis or the second coordinate axis. The initial rectangular unfolded image is sampled to obtain the rectangular unfolded image.

7. The seal area character recognition method according to claim 6, characterized in that, The initial rectangular unfolded image is sampled to obtain the rectangular unfolded image, which includes: Determine the grayscale value changes of adjacent pixels in the expanded rectangular image along the first coordinate axis; If the gray value change is indicated in the direction of the first coordinate axis, and the gray value difference between a preset number of consecutive pixels and adjacent pixels is greater than a first preset difference threshold, then the interpolation step size is reduced, thereby increasing the sampling density. If the gray value change is indicated in the first coordinate axis direction, and the gray value difference between a consecutive preset number of pixels and adjacent pixels is less than a second preset difference threshold, then the interpolation step size is increased, thereby reducing the sampling density, wherein the second preset difference threshold is less than the first preset difference threshold. The initial rectangular unfolded image is sampled according to the sampling density to obtain the rectangular unfolded image.

8. The method for recognizing characters in a seal area according to claim 1, characterized in that, Identifying and extracting the character image to be identified from the expanded rectangular image includes: Determine the pixel distribution characteristics in the expanded rectangular image; The size of the segmentation window is dynamically adjusted based on the pixel distribution characteristics. Multiple candidate character regions are determined in the rectangular unfolded image using the segmentation window; For each candidate character region, the character tilt angle in the candidate character region is determined based on the direction of grayscale gradient change in the candidate character region; The candidate character region is subjected to radiometric transformation correction based on the character tilt angle to obtain the image of the character to be recognized.

9. A seal area character recognition device, characterized in that, include: The first processing module is used to determine candidate stamp image regions in the image based on the color information of pixels in the image, wherein the color information includes hue information, saturation information and brightness information; The second processing module is used to perform point-by-point sliding convolution processing on the candidate stamp image region through a multi-scale circular convolution kernel group, thereby determining the target stamp image region in the candidate stamp image region. The multi-scale circular convolution kernel group includes multiple convolution kernels with concentric ring structures and different radius lengths. The third processing module is used to map the target seal image area into a rectangular unfolded image, and to identify and extract the character image to be identified in the rectangular unfolded image; The fourth processing module is used to perform recognition processing on the character image to be recognized, so as to obtain the seal text corresponding to the target seal image area.

10. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a program, wherein when the program is executed, it controls the device where the non-volatile storage medium is located to execute the seal area character recognition method according to any one of claims 1 to 8.

11. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the seal area character recognition method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the seal area character recognition method as described in claims 1 to 8.

Citation Information

Cited By

  • Seal identification method and device, computer readable storage medium and computer equipment

    CN116152838A

  • Crane complex scene obstacle recognition method and system based on artificial intelligence

    CN121305529A

  • Intelligent medicine box configuration system and intelligent prescription identification method

    CN121354135A

  • Intelligent medicine box configuration system and intelligent medicine prescription identification method

    CN121354135B