Text region segmentation method, apparatus, device, and medium

By performing erosion and dilation processing on the initial image and combining it with single-channel prediction from a deep learning model, the problem of text region adhesion was solved, improving the accuracy and independence of text detection.

CN116863474BActive Publication Date: 2026-03-24GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, closely spaced text regions are prone to sticking together, which affects the accuracy of text detection.

Method used

By eroding the initial image, kernel text boxes are obtained. A pre-trained deep learning model is used for single-channel prediction, and the single-channel kernel text boxes are processed by a dilation function to avoid text region adhesion.

Benefits of technology

It improves the accuracy of text detection, ensures the independence between adjacent text boxes, reduces the probability of text sticking together, and accurately locates the position of different text information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116863474B_ABST
    Figure CN116863474B_ABST
Patent Text Reader

Abstract

The text region segmentation method of the application comprises the following steps: obtaining an initial image, performing text box recognition on the initial image to obtain a first text box, performing corrosion processing on the first text box through a preset corrosion function to obtain a core text box corresponding to the first text box, performing single-channel prediction on the core text box by using a pre-trained deep learning model, and performing division on the single-channel prediction result through a preset division function to obtain a plurality of single-channel core text boxes, performing inflation processing on the single-channel core text boxes through a preset inflation function to obtain corresponding target text boxes, and performing segmentation processing on the text information in the initial image according to the target text boxes, thereby avoiding the adhesion of the text region and improving the accuracy of text detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, for example to a text region segmentation method, device, equipment and medium. BACKGROUND

[0002] Text segmentation is an important step in text detection. The existing text segmentation method usually predicts a text region, finds the outer contour of the text region according to the prediction result, and then obtains the position of the text. However, for texts with close spacing, the text regions predicted for different texts are prone to adhesion, resulting in multiple different texts contained in the same outer contour, thereby affecting the accuracy of text detection. SUMMARY

[0003] The present application aims to provide a text region segmentation method, device, equipment and medium, which can avoid the adhesion of text regions and improve the accuracy of text detection.

[0004] To achieve the above-mentioned purpose, the present application provides a text region segmentation method, comprising:

[0005] obtaining an initial image, performing text box recognition on the initial image to obtain a first text box;

[0006] performing erosion processing on the first text box by a preset erosion function to obtain a core text box corresponding to the first text box;

[0007] performing single-channel prediction on the core text box by using a pre-trained deep learning model, and performing division on the single-channel prediction result by using a preset division function to obtain a plurality of single-channel core text boxes;

[0008] respectively performing inflation processing on the single-channel core text boxes by using a preset inflation function to obtain corresponding target text boxes;

[0009] performing segmentation processing on text information in the initial image according to the target text boxes.

[0010] The present application also provides a text region segmentation device, comprising:

[0011] a text box recognition unit configured to obtain an initial image, perform text box recognition on the initial image to obtain a first text box;

[0012] an erosion processing unit configured to perform erosion processing on the first text box by using a preset erosion function to obtain a core text box corresponding to the first text box;

[0013] A single-channel prediction unit is configured to perform single-channel prediction on the kernel text box by using a pre-trained deep learning model, and distinguish the single-channel prediction result by using a preset splitting function, so as to obtain a plurality of single-channel kernel text boxes;

[0014] An expansion processing unit is configured to perform expansion processing on the single-channel kernel text box by using a preset expansion function, so as to obtain a corresponding target text box;

[0015] A text segmentation unit is configured to perform segmentation processing on the text information in the initial image according to the target text box.

[0016] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the text region segmentation method according to any one of the preceding embodiments and / or the steps of the text region segmentation method according to any one of the preceding embodiments.

[0017] The application further provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the text region segmentation method according to any one of the preceding embodiments and / or the steps of the text region segmentation method according to any one of the preceding embodiments.

[0018] The text region segmentation method provided by the application can increase the distance between adjacent first text boxes by performing erosion processing on the first text box in the initial image to indent the edge of the first text box while retaining the text information, so as to obtain a kernel text box corresponding to the first text box, and reduce the probability of text box adhesion; the prediction range is reduced and the prediction accuracy is improved by performing single-channel prediction on the kernel text box by using a deep learning model; the adhesion of the text information region can be avoided, and the positions of different text information can be more accurately located by performing splitting on the prediction result to obtain single-channel text boxes and then performing expansion processing on the single-channel text boxes, so as to improve the accuracy of text detection. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A flowchart of a text region segmentation method according to an embodiment;

[0020] Figure 2 A structural schematic diagram of a text region segmentation device according to an embodiment;

[0021] Figure 3 A structural schematic block diagram of a computer device according to an embodiment.

[0022] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0023] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0024] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the use of the term "include" in the specification of the present application means that the presence of a feature, integer, step, operation, element, module, module and / or component, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, modules, components and / or their combinations. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be intermediate elements. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any module and all combinations of the associated list.

[0025] Those skilled in the art can understand that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as that generally understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted with idealized or overly formal meanings unless specifically defined as such.

[0026] Reference Figure 1 is a flowchart of a text region segmentation method disclosed by the present application, which comprises:

[0027] S1: obtaining an initial image, performing text box recognition on the initial image to obtain a first text box;

[0028] S2: performing corrosion processing on the first text box through a preset corrosion function to obtain a core text box corresponding to the first text box;

[0029] S3: using a pre-trained deep learning model to perform single-channel prediction on the core text box, and using a preset splitting function to distinguish the single-channel prediction result to obtain a plurality of single-channel core text boxes;

[0030] S4: performing inflation processing on the single-channel core text boxes respectively through a preset inflation function to obtain corresponding target text boxes;

[0031] S5: segmenting the text information in the initial image according to the target text box.

[0032] As described in step S1 above, the initial image is usually a photo, picture, screenshot or the like containing one or more pieces of text information; the spacing between the text information in the initial image can be uniform or non-uniform. Before performing text region segmentation, the initial image is first input into a pre-trained text detection model, and the text information in the initial image is detected by the text detection model to obtain a plurality of first text boxes mask; the text detection model can be a CTPN (Connection Text Proposal network) model.

[0033] As described in step S2 above, the erosion function can be an erode() function in Opencv, specifically, the erode() function can perform erosion processing on the input initial image using a specific structure element, first determine the neighborhood shape in the erosion processing through the structure element, replace each pixel value in the first text box mask with the minimum value on the corresponding neighborhood, thereby completing the erosion of the first text box mask, obtaining a relatively smaller kernel text box text kernel mask, so that the spacing between the kernel text boxes text kernel mask is greater than the spacing between the corresponding first text boxes mask, reducing the possibility of text box adhesion.

[0034] As described in step S3 above, the pre-trained deep learning model can be a CNN (Convolutional Neural Networks) model, the CNN model reduces the total amount of training parameters in the convolutional neural network by mining the spatial correlation of each kernel text box text kernel mask, improves the calculation efficiency of the backpropagation algorithm of the forward propagation network in the model, thereby improving the prediction efficiency. In a specific implementation, after single-channel prediction, the single-channel prediction result can be distinguished by using the split function ConnectedComponentsWithStats() of Opencv to obtain a plurality of single-channel kernel text boxes kernel mask, thereby reducing the single prediction range of the deep learning model.

[0035] As described in step S4, after the smaller kernel text box is subjected to single-channel prediction in step S3, the single-channel prediction result contains the kernel text box of all text information in the initial image. If the single-channel prediction result is directly dilated to obtain the target text box at this time, the problem of text box adhesion will still exist for the text that is relatively close, resulting in poor final text recognition effect. Therefore, the embodiment immediately divides the single-channel prediction result by using a splitting function after obtaining the single-channel prediction result. Since the erosion and dilation in the morphological operation can be converted to each other, the single-channel kernel text box predicted by the deep learning model can be dilated to obtain the final target text box. The dilation function can be the dilate function in Opencv.

[0036] As described in step S5, after the first text box mask is subjected to erosion processing in step S2, the kernel text box text kernel mask with a relatively larger distance is obtained, and the kernel text box text kernel mask is subjected to single-channel prediction and splitting, thereby obtaining a plurality of single-channel kernel text boxes text kernel mask that are independent of each other. Therefore, the target text box text region mask obtained by dilating the single-channel kernel text box text kernel mask is also independent of each other. At this time, the segmented text region obtained by segmenting the text information based on the target text box text region mask in step S5 is also independent of each other, and the situation that the adjacent text information with a relatively close distance is divided into the same text box does not occur. On this basis, the text information of each target text box text region mask is separately recognized, and the independent text information of each text is obtained, thereby avoiding the adhesion in the text recognition process.

[0037] In summary, by performing erosion processing on the first text box in the initial image, the edge of the first text box is indented while the text information is retained, thereby obtaining the kernel text box corresponding to the first text box, increasing the distance between adjacent first text boxes, and reducing the probability of text box adhesion. By performing single-channel prediction on the kernel text box by using the deep learning model, the prediction range is reduced, and the prediction accuracy is improved. By splitting the prediction result to obtain the single-channel text box and then dilating the single-channel text box, the adhesion of the text information region can be avoided, and the positions of different text information can be more accurately positioned, thereby improving the accuracy of text detection.

[0038] In one embodiment, the single-channel prediction of the kernel text box by using the pre-trained deep learning model comprises:

[0039] input the initial image containing the core text box into the deep learning model, so that a convolutional neural network in the deep learning model extracts features of the core text box, obtains a feature map corresponding to the core text box, and outputs the feature map through a single-channel convolutional layer to obtain the single-channel prediction result.

[0040] As described above, the deep learning model first extracts core text box features through a convolutional neural network, and then obtains a feature map of the core text box through a plurality of self-defined deep learning operations. Finally, the feature map is input into a convolutional layer with a convolution kernel size of 1x1 and an output channel number of 1 in the output layer, so that the single-channel prediction result described above can be obtained.

[0041] In one embodiment, the core text box corresponding to the first text box is obtained by performing erosion processing on the first text box through a preset erosion function, including:

[0042] An image coordinate system is established based on the initial image, and text box coordinates of each first text box are obtained;

[0043] A mask of the first text box is obtained according to the text box coordinates, and the mask is subjected to erosion processing through the erosion function to obtain the core text box.

[0044] As described above, each first text box and its corresponding mask can be positioned and marked through the coordinate method, so as to avoid the situation that the single-channel prediction and splitting cannot distinguish the text information at different positions. That is, after the text information in the initial image is subjected to segmentation processing, the original position of the text information in the initial image can be determined according to the coordinate sequence corresponding to each target text box, so as to restore the text content in the initial image. The mask of the first text box can be a binary image.

[0045] In one embodiment, the core text box is obtained by performing erosion processing on the mask through the erosion function, including:

[0046] The mask is subjected to AND operation through a preset first structure matrix;

[0047] According to an operation result of the AND operation, boundary pixels of the mask are subjected to erosion processing pixel by pixel to obtain the core text box.

[0048] As described above, the first structure matrix can be a 3x3 matrix, a 7x7 matrix, or the like, used for edge erosion of the mask as a structure element. The first structure matrix can define a reference point as an anchor point of the erosion function in advance. In a specific embodiment, the erosion function is to delete some pixels on the object boundary by using an algorithm to find a local minimum value, so that the edge of the original binary mask is reduced by one circle. The effect is that the black area outside the binary mask erodes the white area inside, obtaining a smaller core text box relative to the first text box.

[0049] In one embodiment, the performing AND operation on the mask by using the preset first structure matrix comprises:

[0050] controlling the first structure matrix to move on the mask according to a preset rule to scan pixels on the mask in sequence;

[0051] performing AND operation on a first pixel on the first structure matrix and a second pixel corresponding to the first pixel on the mask.

[0052] As described above, the first structure matrix is controlled to scan each pixel of the binary image pixel by pixel in a preset direction, and the first structure matrix is used to perform AND operation on the binary mask covered thereby. If the first pixel and the second pixel corresponding to the first pixel on the mask are both 1, the pixel in the core text box is 1, otherwise, it is 0.

[0053] In one embodiment, the performing dilation processing on the single-channel core text box by using the preset dilation function to obtain a corresponding target text box comprises:

[0054] determining a neighborhood of each third pixel on the single-channel core text box by using the dilation function based on a preset second structure matrix;

[0055] replacing a pixel value of each third pixel with a maximum value on the neighborhood corresponding to the third pixel, and taking the single-channel core text box after the replacement as the target text box.

[0056] As described above, the dilation processing is to perform convolution on the single-channel core text box and the preset second structure matrix of a shape. The second structure matrix can be a 3x3 matrix, and the anchor point is located at the center of the matrix. When performing the dilation processing, a local maximum operator in a pixel field is used by using the dilation function to perform edge dilation on the single-channel core text box, so that the bright area in the text box is gradually expanded, and the effect of text box dilation is achieved.

[0057] In one embodiment, the performing segmentation processing on the text information in the initial image according to the target text box comprises:

[0058] Identify the outer contour of each of the target text boxes;

[0059] The target text box is segmented according to the outer contour, and the text information in each target text box is treated as a segmented independent text.

[0060] As described above, the coordinates of the first text box corresponding to each target text box in the image coordinate system are obtained from the initial image. The minimum bounding rectangle of the target text box is generated in the image coordinate system using the coordinates of the top left, bottom left, top right, and bottom right corners of the target text box, which serves as the outer contour of the target text box.

[0061] Specifically, after segmenting the target text box based on the aforementioned outer contour, each segmented independent text can be identified separately, avoiding text concatenation.

[0062] Reference Figure 2 This is a structural block diagram of a text region segmentation device disclosed in this application. The device includes:

[0063] The text box recognition unit 100 is used to acquire an initial image, perform text box recognition on the initial image, and obtain a first text box.

[0064] The erosion processing unit 200 is used to perform erosion processing on the first text box using a preset erosion function to obtain the kernel text box corresponding to the first text box.

[0065] The single-channel prediction unit 300 is used to perform single-channel prediction on the kernel text box using a pre-trained deep learning model, and to distinguish the single-channel prediction results by a preset splitting function to obtain several single-channel kernel text boxes.

[0066] The expansion processing unit 400 is used to expand the single-channel kernel text box according to a preset expansion function to obtain the corresponding target text box.

[0067] The text segmentation unit 500 is used to segment the text information in the initial image according to the target text box.

[0068] In one embodiment, the single-channel prediction unit 300 is specifically used for:

[0069] The initial image containing the kernel text box is input into the deep learning model, so that the convolutional neural network in the deep learning model extracts features from the kernel text box to obtain the feature map corresponding to the kernel text box, and outputs the feature map through a single-channel convolutional layer to obtain the single-channel prediction result.

[0070] In one embodiment, the corrosion treatment unit 200 is specifically used for:

[0071] An image coordinate system is established based on the initial image, and the text box coordinates of each of the first text boxes are obtained;

[0072] The mask of the first text box is obtained based on the coordinates of the text box, and the mask is eroded using the erosion function to obtain the kernel text box.

[0073] In one embodiment, the corrosion treatment unit 200 is specifically used for:

[0074] The mask is subjected to an AND operation using a preset first structure matrix;

[0075] Based on the result of the AND operation, the boundary pixels of the mask are eroded pixel by pixel to obtain the kernel text box.

[0076] In one embodiment, the corrosion treatment unit 200 is specifically used for:

[0077] Based on a pre-set interference color, the area where the interference color is located is designated as the interference color area;

[0078] The first structure matrix is ​​controlled to move on the mask according to a preset rule, and the pixels on the mask are scanned sequentially.

[0079] Perform a bitwise AND operation between the first pixel on the first structure matrix and the second pixel corresponding to the first pixel on the mask.

[0080] In one embodiment, the expansion processing unit 400 is specifically used for:

[0081] Based on the preset second structure matrix, the neighborhood of each third pixel on the single-channel kernel text box is determined by the expansion function;

[0082] The pixel value of each of the third pixels is replaced with the maximum value in the neighborhood corresponding to the third pixel, and the replaced single-channel kernel text box is used as the target text box.

[0083] In one embodiment, the text segmentation unit 500 is specifically used for:

[0084] Identify the outer contour of each of the target text boxes;

[0085] The target text box is segmented according to the outer contour, and the text information in each target text box is treated as a segmented independent text.

[0086] Reference Figure 3This application also provides a computer device whose internal structure can be as follows: Figure 3 As shown, this computer device includes a processor, memory, network interface, and database connected via a system bus. The processor is designed to provide computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores operating devices, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores text region segmentation data, etc. The network interface is used for communication with external terminals via a network connection. When executed by a processor, this computer program implements a text region segmentation method, comprising the following steps: acquiring an initial image; performing text box recognition on the initial image to obtain a first text box; performing erosion processing on the first text box using a preset erosion function to obtain a kernel text box corresponding to the first text box; performing single-channel prediction on the kernel text box using a pre-trained deep learning model, and distinguishing the single-channel prediction results using a preset splitting function to obtain several single-channel kernel text boxes; performing dilation processing on each single-channel kernel text box using a preset dilation function to obtain corresponding target text boxes; and segmenting the text information in the initial image based on the target text boxes.

[0087] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0088] One embodiment of this application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements a text region segmentation method, including the following steps: acquiring an initial image; performing text box recognition on the initial image to obtain a first text box; performing erosion processing on the first text box using a preset erosion function to obtain a kernel text box corresponding to the first text box; performing single-channel prediction on the kernel text box using a pre-trained deep learning model, and distinguishing the single-channel prediction results using a preset splitting function to obtain several single-channel kernel text boxes; performing dilation processing on each single-channel kernel text box using a preset dilation function to obtain corresponding target text boxes; and performing text information segmentation processing on the initial image based on the target text boxes. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0089] This application discloses a text region segmentation method, apparatus, device, and medium. By eroding a first text box in an initial image, the edges of the first text box are indented while preserving text information, resulting in a kernel text box corresponding to the first text box. This increases the distance between adjacent first text boxes and reduces the probability of text boxes sticking together. A deep learning model is used to perform single-channel prediction on the kernel text box, reducing the prediction range and improving prediction accuracy. The prediction results are then split to obtain single-channel text boxes, and each single-channel text box is dilated. This avoids the sticking of text information regions and more accurately locates the positions of different text information, thereby improving the accuracy of text detection.

[0090] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0091] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0092] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A text region segmentation method, characterized in that, include: Obtain an initial image, and perform text box recognition on the initial image to obtain a first text box; The first text box is eroded using a preset erosion function to obtain the kernel text box corresponding to the first text box; A pre-trained deep learning model is used to perform single-channel prediction on the kernel text box, and the single-channel prediction results are distinguished by a preset splitting function to obtain several single-channel kernel text boxes. The single-channel kernel text boxes are expanded using a preset expansion function to obtain the corresponding target text boxes. The text information in the initial image is segmented according to the target text box, wherein the segmented text regions are independent of each other, and adjacent and closely spaced text information will not be divided into the same text box. The process of inflating the single-channel kernel text boxes using a preset inflating function to obtain the corresponding target text boxes includes: Based on the preset second structure matrix, the neighborhood of each third pixel on the single-channel kernel text box is determined by the expansion function, wherein the second structure matrix is ​​a 3x3 matrix and its anchor point is located at the center of the matrix. The pixel values ​​of each of the third pixels are replaced with the maximum value in the neighborhood of the corresponding third pixel, and the replaced single-channel kernel text box is used as the target text box. The local maxima operator in the pixel neighborhood is used to perform edge dilation on the single-channel kernel text box.

2. The text region segmentation method according to claim 1, characterized in that, The step of using a pre-trained deep learning model to perform single-channel prediction on the kernel text box includes: The initial image containing the kernel text box is input into the deep learning model, so that the convolutional neural network in the deep learning model extracts features from the kernel text box to obtain the feature map corresponding to the kernel text box, and outputs the feature map through a single-channel convolutional layer to obtain the single-channel prediction result.

3. The text region segmentation method according to claim 1, characterized in that, The step of eroding the first text box using a preset erosion function to obtain the kernel text box corresponding to the first text box includes: An image coordinate system is established based on the initial image, and the text box coordinates of each of the first text boxes are obtained; The mask of the first text box is obtained based on the coordinates of the text box, and the mask is eroded using the erosion function to obtain the kernel text box.

4. The text region segmentation method according to claim 3, characterized in that, The process of eroding the mask using the erosion function to obtain the kernel text box includes: The mask is subjected to an AND operation using a preset first structure matrix; Based on the result of the AND operation, the boundary pixels of the mask are eroded pixel by pixel to obtain the kernel text box.

5. The text region segmentation method according to claim 4, characterized in that, The step of performing a bitwise AND operation on the mask using a preset first structure matrix includes: The first structure matrix is ​​controlled to move on the mask according to a preset rule, and the pixels on the mask are scanned sequentially. Perform a bitwise AND operation between the first pixel on the first structure matrix and the second pixel corresponding to the first pixel on the mask.

6. The text region segmentation method according to claim 1, characterized in that, The step of segmenting the text information in the initial image based on the target text box includes: Identify the outer contour of each of the target text boxes; The target text box is segmented according to the outer contour, and the text information in each target text box is treated as a segmented independent text.

7. A text region segmentation device for implementing the method according to any one of claims 1-6, characterized in that, include: A text box recognition unit is used to acquire an initial image, perform text box recognition on the initial image, and obtain a first text box; The erosion processing unit is used to erode the first text box using a preset erosion function to obtain the kernel text box corresponding to the first text box. A single-channel prediction unit is used to perform single-channel prediction on the kernel text box using a pre-trained deep learning model, and to distinguish the single-channel prediction results by a preset splitting function to obtain several single-channel kernel text boxes. The expansion processing unit is used to expand the single-channel kernel text boxes respectively using a preset expansion function to obtain the corresponding target text boxes; The text segmentation unit is used to segment the text information in the initial image based on the target text box.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the text region segmentation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the text region segmentation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Text detection method and device, electronic equipment and computer storage medium

    CN112016551A

  • Text detection method and device, storage medium and computer equipment

    CN112329765A

  • Text detection method and device, equipment and storage medium

    CN113205092A