Image processing method and device

By obtaining key point information of text areas in image processing, performing affine transformation and mapping of de-distortion models, the problem of insufficient image de-distortion effect and efficiency in the prior art is solved, and a high-precision and efficient image de-distortion effect is achieved.

CN120125475APending Publication Date: 2025-06-10BEIJING YUANLI WEILAI SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311686568.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

In the image de-distortion scenario, the effect and efficiency cannot meet the needs of some business scenarios, especially in document images, distortion problems caused by factors such as unsatisfactory camera angles and distances, as well as physical tortuous and wrinkles of documents.

Method used

By obtaining the pending image containing the text area, determining the key point information of the text area, performing affine transformation processing, inputting it into the de-distortion model, mapping the coordinates of pixel points in the distorted space to the non-distortion space, and finally globally updates based on the pixel point mapping coordinates to obtain the de-distortion image.

Benefits of technology

It realizes effective deconversation of the image to be processed, ensuring that the deconversation image is consistent with the original content, improving the accuracy and efficiency of image processing, and is suitable for a variety of business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125475A_ABST
    Figure CN120125475A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, and the method comprises the steps: obtaining a to-be-processed image containing a text region, and determining the key point information corresponding to the text region; performing affine transformation processing on the to-be-processed image according to the key point information to obtain an affine transformation image; mapping the pixel point coordinate of each pixel point in the affine transformation image in a distorted space to a non-distorted space through a distortion removing model, and obtaining the pixel point mapping coordinate of each pixel point in the non-distorted space; and performing global updating on the affine transformation image based on the pixel point mapping coordinates to obtain a distorted image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and device. Background Art

[0002] With the development of computer technology, image processing technology is being applied in more and more scenarios, such as image beautification, image enhancement, image restoration, etc., which all involve image processing technology. Especially in scenarios where downstream businesses need to use high-quality images, the better the image processing effect of the upstream, the more convenient it is for downstream businesses to use. In the image dewarping scenario, after receiving the document image uploaded by the user, due to the randomness of the user's operation when the document image is collected, there may be undesirable factors such as the angle and distance between the camera and the document, and the document may be physically bent, wrinkled, deformed, or placed in a complex background. In order to avoid the influence of the above factors, most of the existing technologies will use calibration methods or deep learning methods to process document images. However, whether it is the calibration method or the deep learning method, there is a problem that the effect and efficiency cannot meet some business scenarios, so there is an urgent need for an effective solution to solve the above problems. Summary of the invention

[0003] In view of this, the embodiment of the present application provides an image processing method to solve the technical defects existing in the prior art. The embodiment of the present application also provides an image processing device, a computing device, and a computer-readable storage medium.

[0004] According to a first aspect of an embodiment of the present application, there is provided an image processing method, comprising:

[0005] Acquire an image to be processed containing a text area, and determine key point information corresponding to the text area;

[0006] Performing affine transformation processing on the image to be processed according to the key point information to obtain an affine transformed image;

[0007] Mapping the pixel coordinates of each pixel in the affine transformed image in the distorted space to the non-distorted space through a dedistortion model to obtain the pixel mapping coordinates of each pixel in the non-distorted space;

[0008] The affine transformed image is globally updated based on the pixel point mapping coordinates to obtain a dedistorted image.

[0009] According to a second aspect of an embodiment of the present application, there is provided an image processing apparatus, including:

[0010] An acquisition module is configured to acquire an image to be processed containing a text area and determine key point information corresponding to the text area;

[0011] A transformation module is configured to perform affine transformation processing on the image to be processed according to the key point information to obtain an affine transformed image;

[0012] A mapping module is configured to map the pixel coordinates of each pixel in the affine transformation image in the distorted space to the non-distorted space through a dedistortion model to obtain the pixel mapping coordinates of each pixel in the non-distorted space;

[0013] The updating module is configured to globally update the affine transformed image based on the pixel mapping coordinates to obtain a dedistorted image.

[0014] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0015] Memory and processor;

[0016] The memory is used to store computer executable instructions, and the processor implements the steps of the image processing method when executing the computer executable instructions.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the image processing method are implemented.

[0018] The image processing method provided in this embodiment can first obtain the image to be processed containing the text area in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content. Then, the key point information corresponding to the text area is determined in the image to be processed. Then, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, thereby cropping the content in the image to be processed that affects the use of downstream businesses. After that, the affine transformed image is input into the dedistortion model, so that the pixel coordinates of each pixel in the affine transformed image in the distorted space are mapped to the non-distorted space by using the dedistortion model, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, thereby obtaining the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. By predicting the mapping relationship of pixel points from the distorted space to the non-distorted space through the dedistortion model, it is possible to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state. At the same time, the mapping is completed in the spatial dimension, thereby ensuring the mapping accuracy, so that the final dedistorted image is consistent with the original content. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1is a schematic diagram of an image processing method provided by an embodiment of the present application;

[0020] Figure 2 is a flow chart of an image processing method provided by an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of an image in an image processing method provided by an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of an image in another image processing method provided by an embodiment of the present application;

[0023] Figure 5 is a processing flow chart of an image processing method provided by an embodiment of the present application;

[0024] Figure 6 is a structural schematic diagram of an image processing device provided by an embodiment of the present application;

[0025] Figure 7 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0027] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0028] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0029] First, the terms involved in one or more embodiments of the present invention are explained.

[0030] CNN: Convolution Neural Network, a feedforward neural network (FNN) that includes convolution operations and has a deep structure. It is widely used in image recognition, natural language processing, speech recognition and other fields.

[0031] Affine transformation, also known as affine mapping, refers to the process in geometry where a vector space is transformed into another vector space by a linear transformation followed by a translation.

[0032] In the present application, an image processing method is provided. The present application also relates to an image processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0033] In practical applications, dewarping solutions are mainly divided into calibration-based methods and deep learning methods. The calibration-based method mainly detects text lines in documents and dewarps based on the detection results. Ideally, the points on the text lines should exist on a regular network. By comparing the offset between the actual position and the ideal position, the distortion parameters can be calculated, and then these parameters are used to dewarp the image. The deep learning method mainly combines the powerful adaptability and generalization of deep learning, and it can be applied to the problem of image distortion correction. Some methods such as CNN can even learn non-parametric distortion models, without the need for explicit parameterized dewarping. Through a large number of distorted and non-distorted image pairs training, the neural network can learn to predict and correct distortions.

[0034] However, due to the wide distribution of document images (such as document images with less text), the existing dewarping solutions based on text line detection are very limited in their use scenarios. After text line detection, the solution to solve the optimization problem by constraining the position of each point on the text line takes longer than the deep learning model. Although the deep learning method is more efficient, its accuracy is controlled by samples and labels. Moreover, since samples and labels are both images, the construction process is more complicated and the accuracy of the obtained model cannot be guaranteed. Therefore, an effective solution is urgently needed to solve the above problems.

[0035] See also Figure 1As shown in the schematic diagram, the image processing method provided in this embodiment can first obtain the image to be processed containing the text area in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content. Then, the key point information corresponding to the text area is determined in the image to be processed. Then, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, thereby cropping the content in the image to be processed that affects the use of downstream businesses. After that, the affine transformed image is input into the dedistortion model, so that the pixel coordinates of each pixel in the affine transformed image in the distorted space are mapped to the non-distorted space by using the dedistortion model, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, thereby obtaining the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. By predicting the mapping relationship of pixel points from the distorted space to the non-distorted space through the dedistortion model, it is possible to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state. At the same time, the mapping is completed in the spatial dimension, thereby ensuring the mapping accuracy, so that the final dedistorted image is consistent with the original content.

[0036] See also Figure 2 , Figure 2 A flowchart of an image processing method provided according to an embodiment of the present application is shown, which specifically includes the following steps:

[0037] Step S202: acquiring an image to be processed containing a text region, and determining key point information corresponding to the text region.

[0038] The image processing method provided in this embodiment can be applied to any dewarping scenario. For example, when a user takes a picture of a book for identification, the book in the image may be physically deformed, such as tortuous, wrinkled, or deformed. Identification based on this image may cause the corresponding text and images in the tortuous, wrinkled, or deformed areas to be unrecognizable. Therefore, it is necessary to dewarp this image to facilitate downstream business use. Or, when the user takes a picture of a document at an angle that deviates, the document content in the image has a perspective tilt problem. Therefore, it is necessary to dewarp this image to facilitate downstream business use. In actual applications, the document image dewarping operation in any scenario can refer to the same or corresponding description of this embodiment.

[0039] Specifically, the image to be processed specifically refers to the image uploaded by the user after taking a photo of the document. Correspondingly, the text area is the area in the image to be processed that corresponds to the document content. Correspondingly, the key point information specifically refers to the coordinates of the key points corresponding to the text area in the image to be processed. The coordinate system corresponding to the coordinates can be constructed based on the image to be processed. For example, the coordinate system can be constructed with the upper left corner of the image to be processed as the origin and the image edge extension direction as the horizontal axis and the vertical axis. The key point information is the coordinates in the coordinate system. In practical applications, since the document is usually a regular rectangle, the key point information can be the corner points corresponding to the text area. For example, if the text area corresponds to A4 paper, the key point information is the coordinates corresponding to the four corner points of the A4 paper.

[0040] Based on this, in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content, the image to be processed containing the text area can be first obtained, and then the key point information corresponding to the text area can be determined in the image to be processed. After that, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, so as to achieve the cropping of the content that affects the use of downstream business in the image to be processed. After that, the affine transformed image is input into the dedistortion model, so as to use the dedistortion model to map the pixel coordinates of each pixel in the affine transformed image in the distorted space to the non-distorted space, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, so as to obtain the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. The mapping relationship of the pixel points from the distorted space to the non-distorted space can be predicted by the dedistortion model, so as to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state, and the mapping is completed in the spatial dimension, so as to ensure the mapping accuracy, so that the dedistorted image finally obtained is consistent with the original content.

[0041] Furthermore, after obtaining the image to be processed containing the text area, in order to accurately determine the key point information corresponding to the text area to facilitate the subsequent affine transformation processing, the key point detection model can be used to realize the positioning of the key point information. In this embodiment, the specific implementation method is as follows:

[0042] The image to be processed is input into a key point detection model for processing to obtain key point information corresponding to the text area in the image to be processed; the key point detection model is trained based on a sample image and sample key point information corresponding to the sample image.

[0043] Specifically, the key point detection model specifically refers to a prediction model that inputs an image to be processed and outputs key point coordinate information corresponding to a text region in the image to be processed. Correspondingly, the sample image and the sample key point information specifically refer to sample pairs for training the key point detection model.

[0044] Based on this, before application, the key point detection model can be trained using sample images and sample key point information corresponding to the sample images. That is to say, the sample image containing the text area can be first input into the key point detection model for processing to obtain the predicted key point information, and then the loss value is calculated by combining the sample key point information and the predicted key point information, and then the key point detection model is trained until a key point detection model that meets the training stop conditions is obtained and deployed and used. After obtaining the applicable key point detection model, the image to be processed can be input into the key point detection model for processing, so that the key point information corresponding to the text area in the image to be processed can be determined by the key point detection model; to facilitate subsequent use.

[0045] For example, a user uploads a Figure 3 The image shown in a needs to recognize the text content in the image. At this time, since the text content in the image is distorted due to the book flipping problem, in order to ensure the accuracy of the final recognition result, the image can be first input into the key point detection model, and the key point detection model can predict the coordinates of the upper left corner, upper right corner, lower left corner and lower right corner corresponding to the text content. After that, affine transformation processing can be performed according to the coordinate information of each corner point to provide a more convenient image for the dedistortion stage.

[0046] In summary, by locating key point information through a key point detection model, the positioning accuracy and efficiency of the key point information can be ensured, thereby improving the efficiency of image dewarping. At the same time, the dewarped content can be ensured to contain key text content, making downstream processing more convenient.

[0047] Step S204: performing affine transformation processing on the image to be processed according to the key point information to obtain an affine transformed image.

[0048] Specifically, after obtaining the key point information corresponding to the text area in the image to be processed, further, considering that when the image to be processed is photographed for a document, it is impossible to ensure that all areas of the photographed image correspond to the text area, that is, in addition to the text area, there may be other areas in the image to be processed. For example, when a user puts a book on a table and takes a photo, not only the book content but also the desktop may be photographed, and the desktop is not the area to be processed. Therefore, after obtaining the key point information corresponding to the text area, the image to be processed can be affine transformed based on the key point information, and the affine transformed image corresponding to the text area can be obtained according to the processing result, so as to facilitate the downstream to perform de-distortion processing based on the affine transformed image.

[0049] The affine transformation processing specifically refers to the operation of translating, rotating, and scaling the image to be processed, which is used to ensure that the affine transformation image obtained after the processing corresponds to the text area and does not cause other dimensional changes in the affine transformation image, such as no change in perspective, color, etc. Correspondingly, the affine transformation image is the image corresponding to the text area obtained after processing the image to be processed. This image has less redundant information than the image to be processed.

[0050] Furthermore, when performing affine transformation processing, the area to be divided corresponding to the text area is actually determined in combination with the key point information, and the area to be divided is cropped according to the global perspective to obtain an affine transformation image corresponding to the global perspective, which can ensure that the image can be subsequently mapped without changing the perspective, thereby ensuring that the content in the image is not affected. In this embodiment, the specific implementation method is as follows:

[0051] The region to be divided corresponding to the text region is determined in the image to be processed according to the key point information; the region to be divided is cropped according to the global perspective corresponding to the image to be processed, and the affine transformation image is obtained according to the cropping result.

[0052] Specifically, the area to be divided refers to the area corresponding to the text area determined in the image to be processed. Correspondingly, the global perspective refers to the shooting perspective corresponding to the image to be processed. Cropping the image to be processed according to this perspective can ensure that the cropped affine transformed image has the same perspective as the image to be processed, thereby ensuring that the text content obtained after the final de-distortion processing is consistent.

[0053] Based on this, after obtaining the key point information corresponding to the text area in the image to be processed, the area to be divided corresponding to the text area can be determined in the image to be processed according to the key point information; on this basis, the area to be divided is cropped according to the global perspective corresponding to the image to be processed, which can ensure that the text content before and after cropping is consistent, and will not cause the loss of text content, and avoid introducing more complex perspective processing, so as to achieve the affine transformation image according to the cropping result. In other words, after obtaining the key point information, the area demarcated by the key point can be mapped to the global perspective of the image to be processed, so as to clear most of the areas outside the text area, and at the same time, the cropped result can be corrected and rotated in combination with the global perspective, so that the final image is restored to the normal visual perception angle. For example, if there is a tilt angle in the text area, the affine transformation image will optimize the tilt angle, which is convenient for downstream business use.

[0054] Using the above example, when determining Figure 3 After obtaining the coordinates of the upper left corner, upper right corner, lower left corner and lower right corner corresponding to the text content in the image shown in a, the text area can be determined in the image according to the coordinates of the upper left corner, upper right corner, lower left corner and lower right corner, and then the text area is mapped to the global perspective of the image to correct and rotate the tilt angle of the text area and enlarge the text area so that the image corresponding to the text area can be restored to the angle of normal visual perception, so as to obtain the following according to the affine transformation processing result: Figure 3 The image shown in b contains only text content, and the text content is horizontally distributed, which is convenient for downstream dewarping processing.

[0055] In summary, by combining the global perspective to perform affine transformation on the image to be processed, it can be ensured that the obtained affine transformed image has a normal visual effect. Based on this, warping processing can effectively improve the dewarping effect and avoid the influence of redundant information in the image on the dewarping effect.

[0056] Step S206, mapping the pixel coordinates of each pixel in the affine transformed image in the distorted space to the non-distorted space through the dedistortion model, and obtaining the pixel mapping coordinates of each pixel in the non-distorted space.

[0057] Specifically, after the affine transformation is performed on the image to be processed to obtain the affine transformation image, further, since the affine transformation image contains text distortion content, and the pixel coordinates of the pixels corresponding to this part of the content are actually expressed in the distorted space, if the pixel coordinates of the pixels are corrected in the distorted space, although a certain de-distortion effect can be achieved, the correction amplitude is small and the effect is poor. This is mainly because the pixel coordinates in the distorted space have an influence factor corresponding to the distortion dimension no matter how they are adjusted, that is, this factor can not only reduce the distortion effect, but also enhance the distortion effect. Therefore, in order to improve the de-distortion effect, the pixel coordinates of each pixel in the affine transformation image in the distorted space can be mapped to the non-distorted space using a de-distortion model, that is, the pixel coordinates in the distorted space are mapped to the non-distorted space without the influence factor corresponding to the distortion dimension, so that the influence factor corresponding to the distortion dimension can be removed after the mapping process, thereby obtaining the pixel mapping coordinates of each pixel in the non-distorted space, and subsequent image adjustment is performed on this basis, which can effectively improve the de-distortion effect, and the de-distortion effect is better.

[0058] Among them, the distorted space specifically refers to a coordinate expression space with influencing factors corresponding to the distorted dimension. The coordinate expressions of the pixels in the space all carry the influencing factors of the corresponding distorted dimension. The magnitude of the influencing factors determines the strength of the distortion effect. For example, the text area corresponding to the plane is less affected by the influencing factors of the distorted dimension, which is close to 0, while the text area corresponding to wrinkles, deformations, etc. is more affected by the influencing factors of the distorted dimension. Correspondingly, the pixel coordinates are the coordinate expressions corresponding to each pixel in the affine transformed image in the distorted space. Correspondingly, the non-distorted space specifically refers to a coordinate expression space that does not have the influencing factors corresponding to the distorted dimension compared to the distorted space. The coordinate expressions of the pixels in the space do not carry the influencing factors of the corresponding distorted dimension. In other words, the coordinate expressions in the non-distorted space are all expressions in a plane state. Correspondingly, the pixel mapping coordinates are the coordinate expressions corresponding to each pixel in the affine transformed image in the non-distorted space. Correspondingly, the dedistortion model specifically refers to a deep learning model that can predict the pixel coordinates in the non-distorted space based on the pixel coordinates in the distorted space. In the training stage, the model learns the mapping relationship from the distorted space to the non-distorted space, so as to achieve the prediction of the pixel mapping coordinates. That is to say, during the training phase, the dewarping model will combine the pixel coordinates of the sample image in the warped space to predict the predicted mapping coordinates of the pixel in the non-warped space. Then, the loss value is calculated by combining the sample pixel mapping coordinates and the predicted mapping coordinates corresponding to the pixel coordinates, and the model parameters are adjusted until a dewarping model that meets the training stop conditions is obtained, realizing the mapping of pixel coordinates in the warped space and the non-warped space.

[0059] Furthermore, when the de-distortion model is used to predict the pixel mapping coordinates, the de-distortion model is actually used to predict the mapping relationship between the pixel points in the distorted space and the non-distorted space, and then the coordinates are determined according to the mapping relationship. In this embodiment, the specific implementation method is as follows:

[0060] A dewarping model is obtained, and the affine transformed image is input into the dewarping model for processing to obtain a pixel mapping relationship; the pixel coordinates of each pixel in the affine transformed image in the warped space are mapped to the non-warped space according to the pixel mapping relationship; and the pixel mapping coordinates of each pixel in the non-warped space are determined according to the mapping result.

[0061] Specifically, the pixel mapping relationship refers to the mapping relationship between the pixel coordinates of the pixel points in the affine transformation image in the distorted space and the corresponding pixel coordinates after the pixel coordinates are mapped to the non-distorted space. The mapping relationship can be understood as a spatial coordinate transformation matrix, which is used to perform pixel coordinate conversion processing in the distorted space and the non-distorted space.

[0062] Based on this, after obtaining the affine transformed image, a dewarping model can be obtained at this time, and the affine transformed image can be input into the dewarping model for processing. The dewarping model predicts the mapping relationship between the pixel coordinates of the pixels in the affine transformed image in the distorted space and the corresponding pixel coordinates after being mapped to the non-distorted space. That is, after obtaining the pixel mapping relationship, the pixel coordinates of each pixel in the affine transformed image in the distorted space can be mapped to the non-distorted space according to the pixel mapping relationship; the pixel mapping coordinates of each pixel in the non-distorted space are determined according to the mapping results, so as to facilitate the subsequent updating of the image according to the coordinates to obtain the dewarped image.

[0063] In practical applications, the dewarping model actually predicts the mapping relationship between the pixel coordinates of the pixel points in the distorted space and the mapping coordinates in the non-distorted space, and this mapping relationship can be represented by flow. Specifically, after the dewarping model inputs the affine transformed image, the model will predict the flow representation, and then the flow representation can be used to perform global dewarping on the current image. The flow representation predicted by the model can be in a set format, such as 64*64. By resampling the flow representation to the same size as the affine transformed image, the pixel mapping coordinates of each pixel in the non-distorted space can be obtained, and then the pixels in the affine transformed image are mapped to the coordinates to obtain a dewarped image.

[0064] Using the above example, we get Figure 3After the affine transformation image shown in b, the affine transformation image can be input into the dewarping model, and the dewarping model predicts the corresponding flow representation (mapping relationship) after the pixel coordinates of each pixel in the affine transformation image in the distorted space are mapped to the non-distorted space. Thereafter, the affine transformation image is resampled based on the flow representation to obtain the pixel mapping coordinates in the non-distorted space after the pixel in the affine transformation image is mapped to the non-distorted space, so as to facilitate the subsequent processing of the affine transformation image according to the coordinates, and the dewarped image can be obtained.

[0065] In summary, by predicting the mapping relationship between pixels in the distorted space and the non-distorted space through the dedistortion model, it is possible to map the pixel coordinates in the distorted space to the non-distorted space, thereby eliminating the influence of the distortion factors and ensuring that the distorted content in the dedistorted image can be removed to achieve a normal viewing angle display effect.

[0066] Step S208: globally update the affine transformed image based on the pixel mapping coordinates to obtain a dedistorted image.

[0067] Specifically, after obtaining the pixel mapping coordinates of each pixel in the affine transformation image in the non-distorted space, further, since the pixel mapping coordinates refer to the coordinates of each pixel in the affine transformation image in the non-distorted space, the affine transformation image is globally updated based on the pixel mapping coordinates, so that each pixel in the affine transformation image can be adjusted according to the pixel mapping coordinates corresponding to each pixel, and the pixel is mapped to a new position, thereby achieving the purpose of global update, eliminating the distortion effect in the image, and obtaining a dedistorted image. The dedistorted image is the image obtained after eliminating the distortion effect in the affine transformation image.

[0068] Furthermore, when the affine transformation image is globally updated, it is actually a process of adjusting the pixels in the image according to the pixel mapping coordinates. In this embodiment, the specific implementation method is as follows:

[0069] Determine a template image corresponding to the affine transformation image, wherein the number of pixels included in the template image is the same as the number of pixels included in the affine transformation image; map the pixels included in the affine transformation image to the template image according to the pixel mapping coordinates, and generate the dedistorted image according to the mapping result.

[0070] Specifically, the template image specifically refers to an image with the same number of pixels as the affine transformation image and no pixel content, which can be understood as a blank template. Based on this, when the affine transformation image is globally updated based on the pixel mapping coordinates, it can be understood as determining the template image corresponding to the affine transformation image, and the number of pixels contained in the template image is the same as the number of pixels contained in the affine transformation image; thereafter, the template image is filled by mapping the pixels contained in the affine transformation image to the template image according to the pixel mapping coordinates, and the filling content comes from the affine transformation image, and the filling position is determined based on the pixel mapping coordinates, so that the dedistorted image can be generated according to the mapping result to achieve the purpose of eliminating the distortion effect.

[0071] Using the above example, we get Figure 3 After the corresponding pixel point mapping coordinates of each pixel point in the affine transformation image shown in b in the non-distorted space are obtained, the position of each pixel point in the affine transformation image can be adjusted according to the pixel point mapping coordinates, and each pixel point can be mapped to the pixel point mapping coordinates, so that the following can be obtained according to the mapping result: Figure 3 The dedistorted image shown in c does not have the distortion effect corresponding to the text content.

[0072] In addition, after the image to be processed is globally distorted, considering that the distortion effect may not reach the optimal state, a finer-grained local distortion process can be performed; that is, the rows in the image can be used as local distortion units, and then dedistortion processing can be performed row by row, thereby improving the distortion effect. In this embodiment, the specific implementation method is as follows:

[0073] The pixel coordinates of the pixels contained in the row area in the dewarped image in the distorted space are mapped to the non-distorted space through a row detection model to obtain the row pixel mapping coordinates of the pixels contained in the row area in the non-distorted space; the row area in the dewarped image is updated based on the row pixel coordinates to obtain a target image.

[0074] Specifically, the row area specifically refers to the area corresponding to each row of text content in the dedistorted image. The text content in this area may still have distortion problems, so local update processing is required. Correspondingly, the row pixel mapping coordinates specifically refer to the pixel coordinates corresponding to the pixel points of the corresponding row area in the dedistorted image in the non-distorted space. Correspondingly, the target image is the image obtained by updating the row area in the dedistorted image based on the row pixel coordinates. The update process of the image can be referred to the update process of the above-mentioned affine transformation image, and this embodiment will not be described in detail here.

[0075] Based on this, after obtaining the dewarped image, considering that the text area corresponds to a large amount of text content, if the dewarping process is only performed from a global perspective, the effect may not be as expected. Therefore, in order to improve the dewarping effect, the dewarping process can be performed from a local perspective. Therefore, the pixel coordinates of the pixels contained in the row area of ​​the dewarped image in the distorted space can be mapped to the non-distorted space through the row detection model, so that the row pixel mapping coordinates of the pixels contained in the row area in the non-distorted space can be obtained according to the prediction results; thereafter, the row area in the dewarped image is updated based on the row pixel coordinates, and the target image can be obtained according to the update result. It should be noted that there may be multiple row areas contained in the affine transformation image, and the mapping process of the pixels in each row area is the same.

[0076] In summary, after globally updating the affine transformed image, locally updating the dewarped image in combination with the row detection model can achieve dewarping processing in a finer-grained dimension, thereby ensuring a better dewarping effect.

[0077] On this basis, in order to improve the efficiency of the row-by-row dewarping effect, the row detection model can be combined to complete the determination of the row pixel mapping coordinates. In this embodiment, the specific implementation method is as follows:

[0078] Acquire a row detection model, and input the dewarped image into the row detection model for processing, to obtain a row area in the dewarped image, and a row pixel point mapping relationship corresponding to the pixels in the row area; map the pixel point coordinates of the pixels contained in the row area in the warped space to the non-warped space according to the row pixel point mapping relationship; and determine the row pixel point mapping coordinates of the pixels contained in the row area in the non-warped space according to the mapping result.

[0079] Specifically, the row pixel mapping relationship refers to the mapping relationship between the pixel coordinates of the pixel points corresponding to the row area in the de-distorted image in the distorted space and the corresponding pixel coordinates after being mapped to the non-distorted space. The mapping relationship can be understood as a spatial coordinate transformation matrix, which is used to perform pixel coordinate conversion processing between the distorted space and the non-distorted space.

[0080] Based on this, after obtaining the dewarped image, the row detection model can be obtained at this time, and the dewarped image can be input into the row detection model for processing. The row detection model predicts the row area in the dewarped image, and the mapping relationship between the pixel coordinates of the pixels corresponding to the row area in the distorted space after being mapped to the corresponding pixel coordinates of the non-distorted space. After that, the pixel coordinates of the pixels contained in the row area in the distorted space can be mapped to the non-distorted space according to the row pixel mapping relationship; thereby, the row pixel mapping coordinates of the pixels contained in the row area in the non-distorted space are determined according to the mapping results, and the pixel mapping processing is performed on this basis, so that the pixels corresponding to the row area in the dewarped image can be mapped to the positions corresponding to the row pixel mapping coordinates, thereby obtaining the target image for the convenience of downstream business use.

[0081] In practical applications, when performing local dewarping, the row information in the dewarped image is actually obtained through the row detection model, and then the flow parameters that need to be locally updated are determined based on the row information. The dewarped image is subsequently adjusted according to the flow parameters to achieve local dewarping, thereby obtaining a target image that meets downstream usage requirements.

[0082] Using the above example, we get Figure 3 After the dewarped image shown in c is obtained, the dewarped image can be input into the row detection model, and the row detection model predicts the corresponding flow parameters after the pixel coordinates of each pixel corresponding to the row area in the dewarped image in the warped space are mapped to the non-warped space. Thereafter, the row area in the dewarped image is resampled based on the flow parameters to obtain the row pixel mapping coordinates in the non-warped space after the pixel corresponding to the row area in the dewarped image is mapped to the non-warped space. Then, the position of the pixel corresponding to the row area in the dewarped image is adjusted according to the row pixel mapping coordinates, and the following can be obtained based on the adjustment result. Figure 4 The target image shown is for the convenience of downstream business use.

[0083] In summary, by performing local updates on the dewarped image, a more fine-grained dewarping process can be achieved, thereby ensuring that the final target image does not carry any distortion effects, so as to facilitate downstream business use.

[0084] After the de-distortion process of the image is completed, the obtained image can be used to perform the recognition task, so that the recognition result can be fed back to the user terminal. In this embodiment, the specific implementation method is as follows:

[0085] A recognition task is created for the dedistorted image, and the text information contained in the dedistorted image is recognized by executing the recognition task; the text information to be detected is determined according to the recognition result, and the target text information is matched with the text information to be detected; and the target text information is fed back to a user terminal associated with the image to be processed.

[0086] Specifically, the recognition task specifically refers to a text recognition task created for a dedistorted image, which is used to recognize the text information contained in the dedistorted image. Accordingly, the text information to be detected specifically refers to the text information obtained after text recognition of the dedistorted image, which may be a question to be answered or a question to be corrected. Accordingly, the target text information is the text information that matches the text information to be detected. When the text information to be detected is a question to be answered, the target text information is the answer text information of the corresponding question. When the text information to be detected is a question to be corrected, the target text information is the information for correcting the question, which is determined based on the answer to the question. Accordingly, the user terminal specifically refers to a terminal device held by the user who uploaded the image to be processed, including but not limited to computers, mobile phones, smart devices, smart wearable devices, etc. In addition, the dedistorted image in this embodiment may also be a target image obtained after local updating.

[0087] Based on this, after obtaining the dedistorted image, in order to be able to feed back the information required by the user terminal, a recognition task can be created for the dedistorted image, and the text information contained in the dedistorted image can be recognized by executing the recognition task; thereafter, the text information to be detected can be determined based on the recognition result, and the target text information can be matched with the text information to be detected; and the target text information can be fed back to the user terminal associated with the image to be processed.

[0088] In actual applications, if the image to be processed uploaded by the user corresponds to the problem-solving requirement, the problem-solving information can be matched with the text information to be detected and fed back to the user terminal. If the image to be processed uploaded by the user corresponds to the correction requirement, the text information to be detected can be corrected at this time, and the correction information can be generated and fed back to the user terminal.

[0089] The image processing method provided in this embodiment can first obtain the image to be processed containing the text area in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content. Then, the key point information corresponding to the text area is determined in the image to be processed. Then, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, thereby cropping the content in the image to be processed that affects the use of downstream businesses. After that, the affine transformed image is input into the dedistortion model, so that the pixel coordinates of each pixel in the affine transformed image in the distorted space are mapped to the non-distorted space by using the dedistortion model, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, thereby obtaining the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. By predicting the mapping relationship of pixel points from the distorted space to the non-distorted space through the dedistortion model, it is possible to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state. At the same time, the mapping is completed in the spatial dimension, thereby ensuring the mapping accuracy, so that the final dedistorted image is consistent with the original content.

[0090] The following combination Figure 5 Taking the application of the image processing method provided by the present application in the document image dedistortion scenario as an example, the image processing method is further described. Figure 5 A processing flow chart of an image processing method provided by an embodiment of the present application is shown, which specifically includes the following steps:

[0091] Step S502, obtaining an image to be processed containing a text area, and inputting the image to be processed into a key point detection model for processing to obtain key point information corresponding to the text area in the image to be processed.

[0092] Step S504: determining the area to be divided corresponding to the text area in the image to be processed according to the key point information.

[0093] Step S506 , cropping the area to be divided according to the global viewing angle corresponding to the image to be processed, and obtaining an affine transformed image according to the cropping result.

[0094] Step S508: obtaining a de-distortion model, and inputting the affine transformed image into the de-distortion model for processing to obtain a pixel mapping relationship.

[0095] Step S510 , mapping the pixel coordinates of each pixel in the affine transformation image in the distorted space to the non-distorted space according to the pixel mapping relationship.

[0096] Step S512: determining the pixel mapping coordinates of each pixel in the non-distorted space according to the mapping result.

[0097] Step S514: determining a template image corresponding to the affine transformation image, wherein the number of pixels included in the template image is the same as the number of pixels included in the affine transformation image.

[0098] Step S516: Mapping the pixels contained in the affine transformed image to the template image according to the pixel mapping coordinates, and generating a dedistorted image according to the mapping result.

[0099] Step S518, obtaining a row detection model, and inputting the dedistorted image into the row detection model for processing, to obtain a row region in the dedistorted image, and a row-pixel mapping relationship corresponding to pixel points in the row region.

[0100] Step S520 , mapping the pixel coordinates of the pixels included in the row area in the warped space to the non-warped space according to the row pixel mapping relationship.

[0101] Step S522: determining the row pixel mapping coordinates of the pixel points included in the row area in the non-distorted space according to the mapping result.

[0102] Step S524, updating the row region in the dewarped image based on the row pixel coordinates to obtain a target image.

[0103] Step S526: creating a recognition task for the de-distorted image, and recognizing text information contained in the de-distorted image by executing the recognition task.

[0104] Step S528, determining the text information to be detected according to the recognition result, and matching the target text information with the text information to be detected.

[0105] Step S530: Feedback the target text information to the user terminal associated with the image to be processed.

[0106] The image processing method provided in this embodiment can first obtain the image to be processed containing the text area in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content. Then, the key point information corresponding to the text area is determined in the image to be processed. Then, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, thereby cropping the content in the image to be processed that affects the use of downstream businesses. After that, the affine transformed image is input into the dedistortion model, so that the pixel coordinates of each pixel in the affine transformed image in the distorted space are mapped to the non-distorted space by using the dedistortion model, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, thereby obtaining the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. By predicting the mapping relationship of pixel points from the distorted space to the non-distorted space through the dedistortion model, it is possible to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state. At the same time, the mapping is completed in the spatial dimension, thereby ensuring the mapping accuracy, so that the final dedistorted image is consistent with the original content.

[0107] Corresponding to the above method embodiment, the present application also provides an image processing device embodiment, Figure 6 FIG. 1 is a schematic diagram showing the structure of an image processing device provided by an embodiment of the present application. Figure 6 As shown, the device comprises:

[0108] The acquisition module 602 is configured to acquire the image to be processed containing the text area and determine the key point information corresponding to the text area;

[0109] The transformation module 604 is configured to perform affine transformation processing on the image to be processed according to the key point information to obtain an affine transformed image;

[0110] A mapping module 606 is configured to map the pixel coordinates of each pixel in the affine transformed image in the distorted space to the non-distorted space through a dedistortion model to obtain the pixel mapping coordinates of each pixel in the non-distorted space;

[0111] The updating module 608 is configured to globally update the affine transformed image based on the pixel mapping coordinates to obtain a dedistorted image.

[0112] In an optional embodiment, the acquisition module 602 is further configured to:

[0113] The image to be processed is input into a key point detection model for processing to obtain key point information corresponding to the text area in the image to be processed; the key point detection model is trained based on a sample image and sample key point information corresponding to the sample image.

[0114] In an optional embodiment, the transformation module 604 is further configured to:

[0115] The region to be divided corresponding to the text region is determined in the image to be processed according to the key point information; the region to be divided is cropped according to the global perspective corresponding to the image to be processed, and the affine transformation image is obtained according to the cropping result.

[0116] In an optional embodiment, the mapping module 606 is further configured to:

[0117] A dewarping model is obtained, and the affine transformed image is input into the dewarping model for processing to obtain a pixel mapping relationship; the pixel coordinates of each pixel in the affine transformed image in the warped space are mapped to the non-warped space according to the pixel mapping relationship; and the pixel mapping coordinates of each pixel in the non-warped space are determined according to the mapping result.

[0118] In an optional embodiment, the updating module 608 is further configured to:

[0119] Determine a template image corresponding to the affine transformation image, wherein the number of pixels included in the template image is the same as the number of pixels included in the affine transformation image; map the pixels included in the affine transformation image to the template image according to the pixel mapping coordinates, and generate the dedistorted image according to the mapping result.

[0120] In an optional embodiment, the device further comprises:

[0121] The region update module is configured to map the pixel coordinates of the pixel points contained in the row region in the dewarped image in the warped space to the non-warped space through a row detection model, and obtain the row pixel mapping coordinates of the pixel points contained in the row region in the non-warped space; and update the row region in the dewarped image based on the row pixel coordinates to obtain a target image.

[0122] In an optional embodiment, the area update module is further configured to:

[0123] Acquire a row detection model, and input the dewarped image into the row detection model for processing, to obtain a row area in the dewarped image, and a row pixel point mapping relationship corresponding to the pixels in the row area; map the pixel point coordinates of the pixels contained in the row area in the warped space to the non-warped space according to the row pixel point mapping relationship; and determine the row pixel point mapping coordinates of the pixels contained in the row area in the non-warped space according to the mapping result.

[0124] In an optional embodiment, the device further comprises:

[0125] The recognition module is configured to create a recognition task for the dedistorted image, and recognize the text information contained in the dedistorted image by executing the recognition task; determine the text information to be detected according to the recognition result, and match the target text information with the text information to be detected; and feed back the target text information to a user terminal associated with the image to be processed.

[0126] The image processing device provided in this embodiment can first obtain the image to be processed containing the text area in order to dedistort the image to be processed, and the dedistorted image is consistent with the original content. Then, the key point information corresponding to the text area is determined in the image to be processed. Then, the image to be processed is affine transformed based on the key point information to obtain the affine transformed image corresponding to the text area, thereby cropping the content in the image to be processed that affects the use of downstream businesses. After that, the affine transformed image is input into the dedistortion model, so that the pixel coordinates of each pixel in the affine transformed image in the distorted space are mapped to the non-distorted space by using the dedistortion model, so that the pixel points in the affine transformed image in the distorted state can be mapped to the non-distorted space, thereby obtaining the pixel mapping coordinates corresponding to the pixel points in the non-distorted space. Finally, the pixel points in the affine transformed image are adjusted based on the pixel mapping coordinates to obtain the dedistorted image. By predicting the mapping relationship of pixel points from the distorted space to the non-distorted space through the dedistortion model, it is possible to ensure the rapid determination of the coordinates corresponding to the pixel points in the non-distorted state. At the same time, the mapping is completed in the spatial dimension, thereby ensuring the mapping accuracy, so that the final dedistorted image is consistent with the original content.

[0127] The above is a schematic scheme of an image processing device of the present embodiment. It should be noted that the technical scheme of the image processing device and the technical scheme of the above-mentioned image processing method belong to the same concept. For details not described in detail in the technical scheme of the image processing device, please refer to the description of the technical scheme of the above-mentioned image processing method. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.

[0128] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present application is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0129] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0130] In one embodiment of the present application, the above components of the computing device 700 and Figure 7Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0131] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.

[0132] The processor 720 is used to execute computer executable instructions of the image processing method.

[0133] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned image processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned image processing method.

[0134] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in an image processing method when executed by a processor.

[0135] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned image processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned image processing method.

[0136] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0137] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0138] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0139] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. An image processing method, characterized in that, comprising: obtaining a to-be-processed image containing a text region, and determining key point information corresponding to the text region; performing an affine transformation process on the to-be-processed image according to the key point information to obtain an affine transformation image; mapping the pixel point coordinates of each pixel point in the affine transformation image in the distorted space to the non-distorted space through a de-distortion model to obtain the pixel point mapping coordinates of each pixel point in the non-distorted space; performing global update on the affine transformation image based on the pixel point mapping coordinates to obtain a de-distorted image.

2. The method according to claim 1, characterized in that, the determining the key point information corresponding to the text region includes: inputting the to-be-processed image into a key point detection model for processing to obtain the key point information corresponding to the text region in the to-be-processed image; the key point detection model is trained based on a sample image and sample key point information corresponding to the sample image.

3. The method according to claim 1, characterized in that, the performing an affine transformation process on the to-be-processed image according to the key point information to obtain an affine transformation image includes: determining a to-be-partitioned region corresponding to the text region in the to-be-processed image according to the key point information; cropping the to-be-partitioned region according to the global perspective corresponding to the to-be-processed image, and obtaining the affine transformation image according to the cropping result.

4. The method according to claim 1, characterized in that, the mapping the pixel point coordinates of each pixel point in the affine transformation image in the distorted space to the non-distorted space through a de-distortion model to obtain the pixel point mapping coordinates of each pixel point in the non-distorted space includes: obtaining a de-distortion model, and inputting the affine transformation image into the de-distortion model for processing to obtain a pixel point mapping relationship; mapping the pixel point coordinates of each pixel point in the affine transformation image in the distorted space to the non-distorted space according to the pixel point mapping relationship; determining the pixel point mapping coordinates of each pixel point in the non-distorted space according to the mapping result.

5. The method according to claim 1, characterized in that, the performing global update on the affine transformation image based on the pixel point mapping coordinates to obtain a de-distorted image includes: determining a template image corresponding to the affine transformation image, wherein the number of pixel points included in the template image is the same as the number of pixel points included in the affine transformation image; mapping the pixel points included in the affine transformation image to the template image according to the pixel point mapping coordinates, and generating the de-distorted image according to the mapping result.

6. The method according to any one of claims 1-5, characterized in that, after the step of performing global update on the affine transformation image based on the pixel point mapping coordinates to obtain a de-distorted image, further comprising: mapping the pixel point coordinates of the pixel points included in the row region in the de-distorted image in the distorted space to the non-distorted space through a row detection model to obtain the row pixel point mapping coordinates of the pixel points included in the row region in the non-distorted space; Update the row region in the undistorted image based on the row pixel point coordinates to obtain a target image.

7. The method according to claim 6, wherein, the step of mapping the pixel point coordinates of the pixels included in the row region in the undistorted image in the distorted space to the non-distorted space through a row detection model to obtain the row pixel point mapping coordinates of the pixels included in the row region in the non-distorted space includes: Obtain a row detection model, and input the undistorted image into the row detection model for processing to obtain the row region in the undistorted image and the row pixel point mapping relationship corresponding to the pixels in the row region; Map the pixel point coordinates of the pixels included in the row region in the distorted space to the non-distorted space according to the row pixel point mapping relationship; Determine the row pixel point mapping coordinates of the pixels included in the row region in the non-distorted space according to the mapping result.

8. The method according to any one of claims 1-5, wherein, after the step of globally updating the affine transformation image based on the pixel point mapping coordinates to obtain an undistorted image, further includes: Create an identification task for the undistorted image, and identify the text information included in the undistorted image by executing the identification task; Determine the text information to be detected according to the identification result, and match the target text information for the text information to be detected; Feed back the target text information to the user terminal associated with the image to be processed.

9. An image processing apparatus, wherein, comprises: An acquisition module configured to acquire an image to be processed including a text region and determine key point information corresponding to the text region; A transformation module configured to perform an affine transformation process on the image to be processed according to the key point information to obtain an affine transformation image; A mapping module configured to map the pixel point coordinates of each pixel in the affine transformation image in the distorted space to the non-distorted space through an undistortion model to obtain the pixel point mapping coordinates of each pixel in the non-distorted space; An update module configured to globally update the affine transformation image based on the pixel point mapping coordinates to obtain an undistorted image.

10. A computing device, wherein, comprises: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium storing computer instructions, wherein, when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.