CN111062874B - Text image display method, device, equipment and storage medium - Google Patents

Text image display method, device, equipment and storage medium Download PDF

Info

Publication number
CN111062874B
CN111062874B CN201911275212.XA CN201911275212A CN111062874B CN 111062874 B CN111062874 B CN 111062874B CN 201911275212 A CN201911275212 A CN 201911275212A CN 111062874 B CN111062874 B CN 111062874B
Authority
CN
China
Prior art keywords
virtual vector
vector line
text image
line
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911275212.XA
Other languages
Chinese (zh)
Other versions
CN111062874A (en
Inventor
周易
郭双双
龚星
李斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911275212.XA priority Critical patent/CN111062874B/en
Publication of CN111062874A publication Critical patent/CN111062874A/en
Application granted granted Critical
Publication of CN111062874B publication Critical patent/CN111062874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/60Rotation of a whole image or part thereof
    • G06T3/608Skewing or deskewing, e.g. by two-pass or three-pass rotation

Abstract

The application discloses a text image display method, a text image display device, text image display equipment and a storage medium. The method comprises the following steps: acquiring a text image to be corrected; determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a vectorization processing result of any side of a minimum external rectangle of at least one text region in the text image to be corrected; determining a rotation angle of the text image to be corrected based on the virtual vector line; and adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under the text image coordinate system. According to the technical scheme provided by the embodiment of the application, the method improves the accuracy of correcting the rotation angle in the text image to be displayed.

Description

Text image display method, device, equipment and storage medium
Technical Field
The present application relates generally to the field of data processing technologies, and in particular, to the field of image technologies, and in particular, to a method, an apparatus, a device, and a storage medium for displaying text images.
Background
In life and work, paper documents are often required to be converted into text images for display, but during conversion, the text images are often rotated and displayed in abnormal reading directions, so that inconvenience is brought to processing of the text images in the later period. Therefore, before displaying the text image, the text image needs to be subjected to direction correction.
However, currently, direction correction can only be performed between discrete values, for example, angle correction such as 0 °, 90 °, 180 °, 270 °, etc. is performed on a text image, and accurate correction of small angles cannot be performed.
Disclosure of Invention
In view of the problem that the prior art cannot accurately correct the text image to be displayed, the application provides a text image display method, a text image display device, a text image display apparatus and a storage medium, which can improve the accuracy of correcting the rotation angle in the text image to be displayed.
In a first aspect, an embodiment of the present application provides a text image display method, where the method includes:
acquiring a text image to be corrected;
determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a vectorization result of any side of a minimum external rectangle of at least one text region in the text image to be corrected;
determining a rotation angle of the text image to be corrected based on the virtual vector line;
and adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under the text image coordinate system.
In a second aspect, an embodiment of the present application provides a text image display apparatus, including:
the acquisition module is used for acquiring a text image to be corrected;
the first determining module is used for determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a vectorization processing result of any side of a minimum circumscribed rectangle of at least one text region in the text image to be corrected;
the second determining module is used for determining the rotation angle of the text image to be corrected based on the virtual vector line;
and the adjusting module is used for adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under the text image coordinate system.
In a third aspect, an embodiment of the present application provides a computer device, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a method that implements the first aspect described above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, the computer program being configured to implement the method of the first aspect.
According to the text image display method provided by the embodiment of the application, the virtual vector line is determined for the text image, the rotation angle of the text image is determined based on the virtual vector line, then the direction of the text image is adjusted according to the rotation angle, so that the text image is displayed in the normal reading direction.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments or the prior art are briefly introduced below, and it is apparent that the drawings are only for the purpose of illustrating a preferred implementation method and are not to be considered as limiting the present application. It should be further noted that, for the convenience of description, only the relevant portions of the present application, and not all, are shown in the drawings.
FIG. 1 is a diagram illustrating an environment architecture for implementing a text image display according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method of displaying text images according to an embodiment of the present application;
FIG. 3 is a text image showing a normal reading orientation according to an embodiment of the present application;
FIG. 4 is a text image showing an abnormal reading direction according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a method for determining virtual vector lines for a text image to be corrected according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating a method of displaying text images according to an embodiment of the present application;
FIG. 7 is a flow chart illustrating another method of displaying text images according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a method for determining virtual vector lines for a text image to be corrected according to an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a projection relationship of a cross product result of a first virtual vector line and a second virtual vector line on a Z-axis of a text image coordinate system according to an embodiment of the present application;
fig. 10 is a block diagram showing a text image display apparatus according to an embodiment of the present application;
FIG. 11 is a diagram illustrating an apparatus for determining virtual vector lines for a text image to be corrected according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer system according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant disclosure and are not limiting of the disclosure. It should be noted that, for the convenience of description, only the portions relevant to the application are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
At present, when the direction of a text image is corrected, most methods can only determine a discrete rotation angle, and can only rotate according to a discrete value when rotating, so that the precision is low, and therefore, under a plurality of scenes requiring high-precision correction, the prior art cannot meet the requirement, for example, the precision required when an image table is optically identified is high, and the prior art cannot do the best. In addition, there are methods of determining the rotation angle by detecting a line segment included in the text image, but if there is no line segment in the text image, the direction of the text image has no way to be corrected, and therefore, this method is not suitable for the correction of the text image without a line segment. Therefore, the method for determining the rotation angle by determining the virtual line for the text image to be corrected is provided, so that not only can the accurate rotation angle be determined, but also the method is suitable for the text image without line segments.
Fig. 1 is an architecture diagram of an implementation environment of a text image display according to an embodiment of the present application. As shown in fig. 1, the implementation environment architecture includes: a terminal 100 and a server 200.
The terminal 100 may independently implement display of the text image, or may cooperate with the server 200 to implement display of the text image.
When the terminal 100 independently implements the display of the text image, the text image to be displayed is stored in the terminal 100. When receiving the text image display instruction, the terminal 100 acquires a text image to be displayed from a predetermined storage location, adjusts the direction of the text image to be displayed that needs to be corrected, and then displays the text image to be displayed through a display interface.
When the terminal 100 and the server 200 cooperate to realize the display of the text image, the text image to be displayed is stored in the server 200, and after the terminal 100 receives the text image display instruction, the text image to be displayed is acquired from the server, the direction of the text image to be displayed which needs to be corrected is adjusted, and then the text image to be displayed is displayed through the display interface. Or, after the terminal 100 receives the text image display instruction, the display instruction is sent to the server 200, the server 200 determines the text image to be displayed, adjusts the direction of the text image to be displayed, which needs to be corrected, and then sends the text image to be displayed, which is adjusted in the direction, to the terminal 100, and the terminal 100 receives and displays the text image to be displayed.
In addition, the terminal 100 may display an application interface for interacting with a user, for example, the user may trigger a text image display instruction through the interface. The type of the terminal 100 includes, but is not limited to, a smart phone, a tablet computer, a television, a notebook computer, a desktop computer, and the like, which is not limited in this embodiment.
The server 200 may be one server, a server cluster composed of a plurality of servers, or a cloud computing service center.
The terminal 100 establishes a communication connection with the server 200 through a wired or wireless network.
Fig. 2 is a flowchart illustrating a text image display method according to an embodiment of the present application. The method shown in fig. 2 may be performed by a text image display apparatus, as shown in fig. 2, the method including the steps of:
step 101, acquiring a text image to be corrected.
The text image is an image including text characters, and is generally a non-vector diagram, and the images shown in fig. 3 and 4 are text images.
The text image to be corrected is a text image with the reading direction being the abnormal reading direction. As shown in fig. 3 and 4, the text image shown in fig. 3 is a text image in the normal reading direction, and the text image shown in fig. 4 is a text image in the abnormal reading direction. As shown in fig. 3, the text direction G in the text image, and the coordinate system formed by the text image, can define the normal reading direction by the relationship between the G and the direction of the Y axis, or the G and the direction of the X axis, and the text image assumes the state shown in fig. 3 on the display screen. In consideration of the allowable error range, the text image in the normal reading direction may have a small included angle between the text direction G and the Y-axis of the coordinate system in which the text image is located, for example, the included angle is smaller than the preset angle. The preset angle is set according to actual conditions, and is 0.5 degrees, for example. In addition, the angle may be an angle having a direction, for example, an angle rotated in a counterclockwise direction from the Y-axis.
As shown in fig. 4, the text image shows an abnormal reading direction, which can be understood as an included angle between the text direction G and the Y axis of the coordinate system where the text image is located is greater than or equal to a preset angle.
The coordinate system may be a two-dimensional rectangular coordinate system XOY or a three-dimensional rectangular coordinate system XYZ. Further, in the case of a three-dimensional coordinate system, the text image is in a plane formed by XOY. Fig. 3 and 4 illustrate three-dimensional rectangular coordinate systems.
The method comprises the following steps: when a plurality of text images to be displayed are received, determining the text images in the abnormal reading direction in the text images to be displayed, and determining the text images in the abnormal reading direction as the text images to be corrected.
Step 102, determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a result of vectorization processing on any side of a minimum external rectangle of at least one text region in the text image to be corrected.
Wherein the text area is a certain line of text area. The minimum circumscribed rectangle comprises four edges, namely an upper edge, a lower edge, a left edge and a right edge, and the virtual vector line can be any one of the four edges, namely the upper edge, the lower edge, the left edge and the right edge. In the embodiment of the present application, the sides corresponding to the upper, lower, left, and right directions are sequentially referred to as a virtual vector upper line, a virtual vector underline, a virtual vector left line, and a virtual vector right line, respectively.
It should be noted here that the minimum bounding rectangle is virtually present, and therefore the virtual vector line is also virtually present. Fig. 5 is a diagram of the corrected text image shown in fig. 4 after the virtual vector underline and the virtual vector left line are determined.
Alternatively, referring to fig. 6, step 102 may include the steps of:
step 1021, determining a virtual vector line group for at least one text region in the text image to be corrected, wherein the virtual vector line group comprises a first virtual vector line and a second virtual vector line, and the first virtual vector line and the second virtual vector line approximately share the same endpoint.
The virtual vector line groups can be multiple groups, and each group of virtual vector line groups comprises a first virtual vector line and a second virtual vector line, and the first virtual vector line and the second virtual vector line approximately share the same endpoint, wherein the approximately sharing of the same endpoint comprises sharing of the same endpoint, or the two endpoints are close in distance and the distance can be ignored. Multiple groups of virtual vector line groups are obtained from the same text image to be corrected, as shown in fig. 4, each line of text region corresponds to one minimum circumscribed rectangle, and multiple groups of virtual vector line groups can be obtained by extracting one group of virtual vector line groups from each minimum circumscribed rectangle. The first virtual vector line and the second virtual vector line included in the virtual vector line group may be any one of the following cases:
the first method comprises the following steps: a virtual vector underline and a virtual vector left line;
and the second method comprises the following steps: a virtual vector underline and a virtual vector right-hand line;
and the third is that: the virtual vector is drawn up and the virtual vector left side line is drawn up;
and fourthly: a virtual vector upper line and a virtual vector right line.
Each group of virtual vector line groups comprises 2 virtual vector lines, the 2 virtual vector lines approximately share the same end point, and thus the approximately shared same end point can be determined as the starting point or the end point of the 2 virtual vector lines, so that the directions of the 2 virtual vector lines can be determined, the rotation angle with any size can be determined when the rotation angle is determined according to any virtual vector line, otherwise, if the text image rotates by 180 degrees, the rotation angle cannot be determined by only using a line without the direction.
Alternatively, referring to fig. 7 or 8, step 1021 may include the steps of:
step 1021a, inputting the text image to be corrected into a point set detection model which is constructed in advance, and outputting a pixel point set obtained by detecting the text image to be corrected.
The pre-constructed point set detection model is obtained by training based on a Full Convolution Network (FCN), and preferably, a network framework of the detection model is deplaybv 3, and a main network of the detection model is Resnet _18.
The point set is composed of pixel points of the text image to be corrected, and further comprises pixel points corresponding to the minimum circumscribed rectangle. However, in the process of determining the rotation angle of the text image to be corrected, only one virtual vector line of the four virtual vector lines mentioned in step 1021 needs to be determined, and therefore, when the point set is detected by using the pre-constructed point set detection model, only a point set corresponding to one virtual vector line needs to be detected. That is, only the point sets corresponding to the two lines sharing the same end point in the minimum bounding rectangle need to be detected here.
Optionally, detecting a point set of the text image to be corrected includes: inputting the text image to be corrected into a pre-constructed point set detection model so that the pre-constructed point set detection model can identify line type pixel points included in the text image to be corrected; and determining the identified line type pixel points as a point set. The line type pixel points comprise a first line type pixel point and a second line type pixel point, and are pixel points corresponding to two lines sharing the same endpoint in the minimum external rectangle. The point sets may include different subsets, such as a first point set and a second point set, where the first line type pixel points form the first point set and the second line type pixel points form the second point set.
The point set detection model constructed in advance can detect the point set by the following method: classifying pixel points in the text image to be corrected to obtain line pixel points and non-line pixel points, determining the line pixel points as one point in a point set, and discarding the non-line pixel points, thereby obtaining the point set of the text image to be corrected.
In addition, the detected line pixels can be marked with the same color, for example, white to identify the line pixels.
Although the point set shown in fig. 8 is composed of individual separated points, in actual cases, the detected point sets are densely distributed one after another, and a line segment composed of the densely distributed point sets is observed with the naked eye. A single discrete point is shown in fig. 8 only for ease of understanding.
It should be noted that, at this time, it cannot be determined which point sets are the first point set and which point sets are the second point set, but the first point set corresponds to one pixel line, and the second point set corresponds to another pixel line.
In addition, it should be noted that the pre-constructed point set detection model is obtained by constructing a model, and then training and testing the model by using a large number of text images, so that the pre-constructed point set detection model can detect line type pixel points of the text image to be corrected.
When the point sets are detected, only the point sets corresponding to the two lines sharing the same end point in the minimum circumscribed rectangle need to be detected, so that before training, the point sets corresponding to which two lines in the minimum circumscribed rectangle are used in the process of determining the rotation angle of the text image to be corrected are firstly determined, and during training, only the point sets corresponding to the two lines are trained. The specific process is as follows:
firstly, defining a point set corresponding to two lines in a circumscribed rectangle used in the process of determining the rotation angle of a text image to be corrected;
secondly, collecting a data set, wherein the data set can be a text image in a normal reading direction;
thirdly, manually marking a point set of each text image in the data set to obtain a point set image, wherein each point set image can only have the point set and has no text image content for facilitating image processing;
fourthly, randomly rotating and marking each Zhang Dianji image of the point set to obtain a point set image with a rotation angle, and marking the point set image as a new data set;
fifthly, dividing the new data set into a training set and a testing set, wherein the training set also comprises a text image set which has a rotation angle and does not have a manual mark point set;
and sixthly, inputting the text image without the manually marked point set into the point set detection model, outputting a point set detection result, comparing the point set detection result with the corresponding manually marked point set image to obtain an error, adjusting parameters of the point set detection model according to the error until the error is converged directly, and obtaining the point set detection model.
Seventhly, inputting the data of the test set into a trained point set detection model, outputting a point set detection result, and determining the current point set detection model as a final used point set detection model when the detection accuracy reaches a preset value; and when the accuracy rate does not reach the preset value, re-executing the steps until the accuracy rate reaches the preset value.
And 1021b, converting the point set into a virtual vector line set by using a preset algorithm.
Alternatively, the preset algorithm may be a hough transform. The hough transform may identify line segments in the image and obtain coordinates of the line segments. That is, the point sets detected in step 1021a can be identified by hough transform, and the coordinates of the points at the two ends of each point set are obtained, and a virtual vector line set is obtained by a line formed by the points at the two ends.
Step 1021c, calculating the slope of each virtual vector line in the virtual vector line set, and dividing the slope into a first slope and a second slope.
After calculating the slopes of all virtual vector lines included in the virtual vector line set, two slopes may be obtained, and the two slopes may divide the virtual vector line set into two subsets, a first virtual vector line set and a second virtual vector line set, where the first virtual vector line set includes the first point set and the second virtual vector line set includes the second point set. At this time, the point sets corresponding to the first virtual vector line set and the second virtual vector line set may be divided into the following combination cases according to the slope:
the first method comprises the following steps: a lower dot set and a left dot set;
and the second method comprises the following steps: a lower stroke point set and a right side point set;
and the third is that: an upper stroke point set and a left side point set;
and fourthly: the upper dot set and the right dot set.
Therefore, when detecting the point set, it is necessary to determine which point set is used in advance, so that only the detection method of the point set used needs to be trained when training the point set detection model, so that only one point set is identified during identification.
It should be noted here that, the slopes of the lines included in each of the first virtual vector line set and the second virtual vector line set are not absolutely equal, and therefore, step 1021c may be: calculating the slope of each virtual vector line in the virtual vector line set; and taking the line with approximately equal slope as a line in a virtual vector line set, and calculating the average value of the slopes of all the lines in the virtual vector line set to obtain the first slope or the second slope.
And step 1021d, determining the line corresponding to the first slope as a first virtual vector line set, and determining the line corresponding to the second slope as a second virtual vector line set.
Step 1021e, for each first virtual vector line included in the first virtual vector line set, matching a second virtual vector line in the second virtual vector line set to obtain a virtual vector line group.
The virtual vector line group is the virtual vector line group described in step 102.
Since the two virtual vector lines included in each set of virtual vector line groups approximately share the same end point, the second virtual vector line to which each first virtual vector line matches is the one in the set of second virtual vector lines that is closest in distance to the first virtual vector line to be matched. Thus, optionally, for each first virtual vector line included in the set of first virtual vector lines, its second virtual vector line may be matched by:
step one, for a first virtual vector line to be matched currently, calculating the distance between the first virtual vector line and all second virtual vector lines.
Wherein the distance may be a minimum distance from all points in the first virtual vector line to all points in the second virtual vector line.
And step two, determining the minimum distance in all the distances.
When there are multiple identical minimum distances among all distances, one minimum distance may be randomly determined.
And step three, when the minimum distance is smaller than a preset threshold value, acquiring a second virtual vector line corresponding to the minimum distance.
And step four, determining that the first virtual vector line to be matched is matched with the second virtual vector line corresponding to the minimum distance.
Alternatively, the distance may be in the form of a euclidean distance.
For each first virtual vector line included in the first virtual vector line set, after the second virtual vector line corresponding to the first virtual vector line is matched by the above method, a plurality of groups of virtual vector line sets are obtained.
When the minimum distance is equal to or greater than the preset threshold, the distance between the two virtual vector lines is considered to be too far, the two virtual vector lines are determined to be a disqualified line group, and the virtual vector line group is discarded.
Since the two virtual vector lines included in the virtual vector line group are virtual vector lines of the same text region, the included angle between the two virtual vector lines included in the virtual vector line group is close to 90 degrees. Therefore, when the included angle between two virtual vector lines included in the virtual vector line group is not close to 90 degrees, the two virtual vector lines included in the virtual vector line group may also be regarded as unqualified lines, and need to be discarded, so as to improve the accuracy of the determined virtual vector line, and further improve the accuracy of the rotation angle determined according to the virtual vector line. Therefore, optionally, after the second virtual vector line corresponding to the minimum distance is acquired, the following process may be further included:
step one, calculating an included angle between the first virtual vector line and a second virtual vector line corresponding to the minimum distance.
And step two, when the difference value of the included angle and the standard right angle is within a preset range, determining that the second virtual vector line corresponding to the obtained minimum distance is matched with the first virtual vector line to be matched currently.
In addition, after matching is completed, two end points closest or farthest to each other in two virtual vector lines in the same virtual vector line group may be determined as starting points of the two virtual vector lines. Therefore, after the matching is completed, the starting points of the first virtual vector line and the second virtual vector line can be determined by the distance between the respective end points of the matched first virtual vector line and second virtual vector line. Further, the specific process is as follows: and calculating the distance between the coordinates of the two end points included by the first virtual vector line and the two end points included by the second virtual vector line, and determining the two end points which are closest or farthest to each other as the starting points of the first virtual vector line and the second virtual vector line.
In addition, the two matched virtual vector lines are virtual vector lines of the same text region, and the starting points or the end points of the two virtual vector lines should be the same point. However, since there is an error when detecting the point set or converting the point set into the virtual vector line set, there may be a certain distance between the start points or the end points of two matched virtual vector lines, and therefore, after the matching is completed, the start points or the end points of the two virtual vector lines may be corrected to unify the start points or the end points into the same point, so as to improve the accuracy of the positions of the two virtual vector lines.
Optionally, after matching one second virtual vector line in the second set of virtual vector lines for each first virtual vector line included in the first set of virtual vector lines, the method further comprises:
and correcting two approximately coincident end points of the first virtual vector line and the second virtual vector line to be the same end point, and obtaining a new first virtual vector line and a new second virtual vector line as a virtual vector line group.
Optionally, modifying the start point or the end point of the first virtual vector line and the second virtual vector line so that the start point or the end point of the first virtual vector line and the second virtual vector line are the same point comprises:
step one, reversely extending a first virtual vector line and a second virtual vector line to enable the first virtual vector line and the second virtual vector line to be intersected to obtain an intersection point;
and step two, determining the intersection point as a new common starting point or end point of the first virtual vector line and the second virtual vector line.
Here, fig. 8 illustrates a correction starting point as an example.
Step 1022, determining the first virtual vector line or the second virtual vector line as a virtual vector line based on the projection relationship of the cross product result of the first virtual vector line and the second virtual vector line on the Z-axis of the text image coordinate system.
The projection relationship of the Z axis of the text image coordinate system due to the cross product result of the first virtual vector line and the second virtual vector line comprises:
(virtual vector underlining X virtual vector left line) · (X Y) ≦ 0
(virtual vector underline X virtual vector right-hand line) · (X Y) ≧ 0
(virtual vector upper line is multiplied by virtual vector left line) · (X multiplied by Y) ≥ 0
(virtual vector upper line is multiplied by virtual vector right line) · (X is multiplied by Y) is less than or equal to 0
Thus, optionally, referring to fig. 7, step 1022 includes:
step 1022a, calculate a first cross product of the first virtual vector line and the second virtual vector line.
Step 1022b, calculate a second cross product of the first axis standard unit vector and the second axis standard unit vector of the text image coordinate system.
The first-axis standard unit vector may be a unit vector on an X-axis in a right-hand rectangular XYZ coordinate system, and the second-axis standard unit vector may be a unit vector on a Y-axis.
Step 1022c, when the dot product of the first cross product and the second cross product satisfies the preset condition, determining that the first virtual vector line or the second virtual vector line is a virtual vector line.
Further, the relationship between the preset condition and the virtual vector line is illustrated by taking a virtual vector underline and a virtual vector left line as examples: the projection of the virtual vector underline and the cross product result of the virtual vector left line on the Z axis of the text image coordinate system is opposite to the direction of the Z vector; and the projection of the cross product result of the left line of the virtual vector and the underline of the virtual vector on the Z axis of the text image coordinate system is the same as the direction of the Z vector. Therefore, when the product of the first cross product and the second cross product is less than or equal to 0, the first virtual vector line is determined to be the virtual vector underline, and the second virtual vector line is determined to be the virtual vector left line; and when the product of the first cross product and the second cross product is greater than 0, determining that the first virtual vector line is a virtual vector left side line, and determining that the second virtual vector line is a virtual vector underline.
In addition, it should be noted that, when the virtual vector line group is in other three cases, the method for determining the virtual vector line by using the preset condition is similar to this, and is not described herein again.
In addition, referring to fig. 9, for the projection relationship of the cross product result of the first virtual vector line and the second virtual vector line on the Z axis of the text image coordinate system, taking the virtual vector underline and the virtual vector left-side line as an example, it proves as follows:
if the left line of the virtual vector is l, the vector in the three-dimensional coordinate system is represented as (l) x ,l y 0); under a virtual vectorIf the line is marked as d, the vector in the three-dimensional coordinate system is expressed as (d) x ,d y 0); for the text image to be corrected, assuming that it is a unit vector, its vector in the three-dimensional coordinate system is represented as (1,1,0). The cross product of the virtual vector underline and the virtual vector left line is:
d×l=d x l y -d y l x
project dxl on the Z-axis (denoted by projdct):
projdct=(d×l)·Z=d x l y -d y l x
the following will prove the projection as a non-positive number:
it is known that:
d⊥l
then the process of the first step is carried out,
d·l=0
or
d x l x +d y l y =0
When d is x If =0, then projdct = -d y l x Due to d y ≥0,l x Not less than 0, at this time:
projdct≤0
when d is x When not equal to 0, by d x l x +d y l y =0, one can obtain:
Figure BDA0002315375500000131
will be provided with
Figure BDA0002315375500000132
Substituting projdct, then:
Figure BDA0002315375500000133
due to d y ≥0,l x More than or equal to 0, the following can be obtained:
projdct≤0
in summary, the projection proj dct of the new vector d × l obtained by vector cross-multiplication of the virtual vector underline d and the virtual vector left line l on the Z vector in the image coordinate system is not positive, that is, the projection of the cross-multiplication result of the virtual vector underline and the virtual vector left line on the Z axis of the text image coordinate system is opposite to the Z vector direction, and there is the following inequality:
(virtual vector underlining X virtual vector left line) · (X X Y) ≦ 0
For the other three cases of the virtual vector line group, the corresponding formula proving method is similar to this, and is not described herein again.
And 103, determining the rotation angle of the text image to be corrected based on the virtual vector line.
Optionally, this step includes:
step one, obtaining the coordinates of any two non-coincident points on the virtual vector line.
And step two, calculating the rotation angle of the text image to be corrected based on the coordinates of the two non-coincident points.
Wherein, calculating the rotation angle of the text image to be corrected based on the coordinates of the two non-coincident points comprises: and calculating the rotation angle of the text image to be corrected by using a preset algorithm based on the coordinates of the two non-coincident points. Wherein, the using the preset algorithm may be using a preset function.
Illustratively, when the rotation angle of the text image to be corrected is determined by using the virtual vector underline, and the starting point of the virtual vector underline is the closest point to the starting point of the drawing line on the virtual vector, and any two non-coincident points are the starting point and the end point of the virtual vector underline, step 103 may be:
first, the coordinates of the start point and the end point of the virtual vector underline are obtained, and the obtained coordinates of the start point and the end point are assumed to be:
Figure BDA0002315375500000141
translating the vector to the origin to obtain a vector line
Figure BDA0002315375500000142
Then using atan2 () function, its rotation angle θ is calculated, where θ ∈ [ - π, π ].
In addition, when the used virtual vector line groups are the other three types, the rotation angle of the text image to be corrected is calculated by using a similar method, which is not described herein again.
In addition, it should be noted that in the method provided in the embodiment of the present application, when determining virtual vector lines for a text image to be corrected, the same virtual vector lines of all text regions in the text image are determined, and then at least one of the virtual vector lines is selected to be used for determining a rotation angle. Of course, one or more text regions may be determined first, then the virtual vector line is determined for the determined text region, and then the rotation angle is determined according to the virtual vector line.
And 104, adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under a text image coordinate system.
And after the rotation angle is determined, rotating the text image to be corrected according to an angle which is opposite to the rotation angle and has the same size, so as to adjust the direction of the text image to be corrected.
Alternatively, the angular rotation may be implemented by a method of rotating a matrix, specifically, assuming that the rotation center is the center point (c) of the text image to be corrected x ,c y ) Then the rotation matrix M is as follows:
Figure BDA0002315375500000151
in summary, according to the text image display method provided in the embodiment of the present application, the virtual vector line is determined for the text image, the rotation angle of the text image is determined based on the virtual vector line, and then the direction of the text image is adjusted according to the rotation angle, so that the text image is displayed in the normal reading direction.
The embodiments in this specification are described in a progressive manner, and similar parts between the various embodiments are referred to each other. The examples below each step focus on the specific method below that step. The above-described embodiments are merely illustrative, and the specific examples are only illustrative of the present application, and those skilled in the art can make several improvements and modifications without departing from the principle described in the examples of the present application, and these improvements should be construed as the scope of the present application.
Fig. 10 is a block diagram of a text image display apparatus according to an embodiment of the present application. The apparatus may be an apparatus in a terminal or a server, as shown in fig. 10, and includes:
an obtaining module 901, configured to obtain a text image to be corrected;
a first determining module 902, configured to determine a virtual vector line for the text image to be corrected, where the virtual vector line is a result of performing vectorization processing on any side of a minimum circumscribed rectangle of at least one text region in the text image to be corrected;
a second determining module 903, configured to determine a rotation angle of the text image to be corrected based on the virtual vector line;
and an adjusting module 904, configured to adjust a display direction of the text image to be corrected according to the rotation angle, so as to obtain a normal reading image displayed in a text image coordinate system.
Optionally, referring to fig. 11, the first determining module 902 includes:
a first determining unit 9021, configured to determine a virtual vector line group for at least one text region in the text image to be corrected, where the virtual vector line group includes a first virtual vector line and a second virtual vector line, and the first virtual vector line and the second virtual vector line approximately share a same endpoint;
a second determining unit 9022, configured to determine, based on a projection relationship of a cross product result of the first virtual vector line and the second virtual vector line on a Z axis of the text image coordinate system, that the first virtual vector line or the second virtual vector line is a virtual vector line.
Optionally, the first determining unit 9021 is further configured to:
inputting a text image to be corrected into a pre-constructed point set detection model, and outputting a pixel point set obtained by detecting the text image to be corrected, wherein the pixel point set is a point set corresponding to two sides sharing the same end point in the minimum circumscribed rectangle of the text region;
converting the point set into a virtual vector line set by using a preset algorithm;
calculating the slope of each virtual vector line in the virtual vector line set, and dividing the slope into a first slope and a second slope;
determining a line corresponding to the first slope as a first virtual vector line set, and determining a line corresponding to the second slope as a second virtual vector line set;
and for each first virtual vector line included in the first virtual vector line set, matching a second virtual vector line in the second virtual vector line set to obtain a virtual vector line group.
Optionally, the second determining unit 9022 is further configured to:
calculating a first cross product of the first virtual vector line and the second virtual vector line;
calculating a second cross product of the first axis standard unit vector and the second axis standard unit vector of the text image coordinate system;
and when the dot product of the first cross product and the second cross product meets a preset condition, determining that the first virtual vector line or the second virtual vector line is a virtual vector line.
Optionally, the first determining unit 9021 is further configured to:
calculating the distances between the first virtual vector line to be matched and all second virtual vector lines;
determining the minimum distance of all the distances;
when the minimum distance is smaller than a preset threshold value, a second virtual vector line corresponding to the minimum distance is obtained;
and determining that the first virtual vector line to be matched is matched with the second virtual vector line corresponding to the minimum distance.
Optionally, the first determining unit 9021 is further configured to:
calculating an included angle between the first virtual vector line and a second virtual vector line corresponding to the minimum distance;
and when the difference value of the included angle and the standard right angle is within a preset range, determining that the second virtual vector line corresponding to the acquired minimum distance is matched with the first virtual vector line to be matched currently.
Optionally, the first determining unit 9021 is further configured to:
and correcting two approximately coincident end points of the first virtual vector line and the second virtual vector line to be the same end point, and obtaining a new first virtual vector line and a new second virtual vector line as a virtual vector line group.
In addition, please refer to the method embodiment for related contents in the device embodiment, which are not described herein again.
In summary, the text image display apparatus provided in the embodiment of the present application determines the virtual vector line in the text image, determines the rotation angle of the text image based on the virtual vector line, and then adjusts the direction of the text image according to the rotation angle, so that the text image is displayed in the normal reading direction.
Fig. 12 is a schematic diagram illustrating a configuration of a computer system 1100 according to an embodiment of the present application, and the computer system includes a Central Processing Unit (CPU) 1101 which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1102 or a program loaded from a storage section into a Random Access Memory (RAM) 1103. In the RAM1103, various programs and data necessary for system operation are also stored. The CPU1101, ROM1102, and RAM1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output section including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a network interface card such as a LAN card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. Drives are also connected to the I/O interface 1105 as needed. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, the processes described by the flowcharts according to the embodiments of the present application may be implemented as computer software programs. For example, method embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. The above-described functions defined in the system of the present application are executed when the computer program is executed by a Central Processing Unit (CPU) 1101.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves. The described units or modules may also be provided in a processor, and may be described as: a processor includes an acquisition module, a first determination module, a second determination module, and an adjustment module. Wherein the designation of such a unit or module does not in some way constitute a limitation on the unit or module itself.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the text image display method as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 2: step 101, acquiring a text image to be corrected; 102, determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a vectorization result of any side of a minimum external rectangle of at least one text region in the text image to be corrected; 103, determining a rotation angle of the text image to be corrected based on the virtual vector line; and 104, adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under a text image coordinate system. As another example, the electronic device may implement the various steps shown in fig. 6 and 7.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.
In summary, the text image display computer system or the computer readable medium provided in the embodiment of the present application determines a virtual vector line for a text image, determines a rotation angle of the text image based on the virtual vector line, and then adjusts a direction of the text image according to the rotation angle, so that the text image is displayed in a normal reading direction.
The foregoing is considered as illustrative only of the preferred embodiments of the invention and illustrative only of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the application referred to in the present application is not limited to the embodiments with a particular combination of the above-mentioned features, but also encompasses other embodiments with any combination of the above-mentioned features or their equivalents without departing from the scope of the application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (13)

1. A method for displaying a text image, the method comprising:
acquiring a text image to be corrected;
determining a virtual vector line for the text image to be corrected, wherein the virtual vector line is a result of vectorization processing on any side of a minimum circumscribed rectangle of at least one text region in the text image to be corrected;
determining a rotation angle of the text image to be corrected based on the virtual vector line;
adjusting the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed under a text image coordinate system,
wherein, the determining a virtual vector line for the text image to be corrected includes:
determining a virtual vector line group for at least one text region in the text image to be corrected, wherein the virtual vector line group comprises a first virtual vector line and a second virtual vector line, and the first virtual vector line and the second virtual vector line can share the same endpoint;
determining the first virtual vector line or the second virtual vector line as the virtual vector line based on the projection relationship of the cross product result of the first virtual vector line and the second virtual vector line on the Z axis of the text image coordinate system, wherein the text image coordinate system is a rectangular coordinate system XYZ, and the text image is located on an XOY plane of the text image coordinate system.
2. The method for displaying a text image according to claim 1, wherein the determining a virtual vector line group for at least one text region in the text image to be corrected comprises:
inputting the text image to be corrected to a point set detection model which is constructed in advance, and outputting a pixel point set obtained by detecting the text image to be corrected, wherein the pixel point set is a point set which corresponds to two sides sharing the same endpoint in the minimum circumscribed rectangle of the text region;
converting the point set into a virtual vector line set by using a preset algorithm;
calculating the slope of each virtual vector line in the virtual vector line set, and dividing the slope into a first slope and a second slope;
determining a line corresponding to the first slope as a first virtual vector line set, and determining a line corresponding to the second slope as a second virtual vector line set;
and for each first virtual vector line included in the first virtual vector line set, matching a second virtual vector line in the second virtual vector line set to obtain the virtual vector line group.
3. The text image display method according to claim 1, wherein the determining that the first virtual vector line or the second virtual vector line is the virtual vector line based on a projection relationship of a cross product result of the first virtual vector line and the second virtual vector line on a Z-axis of the text image coordinate system includes:
calculating a first cross product of the first virtual vector line and the second virtual vector line;
calculating a second cross product of the first axis standard unit vector and the second axis standard unit vector of the text image coordinate system;
and when the dot product of the first cross product and the second cross product meets a preset condition, determining the first virtual vector line or the second virtual vector line as the virtual vector line.
4. The text image display method according to claim 2,
said matching, for each first virtual vector line included in said first set of virtual vector lines, one second virtual vector line in said second set of virtual vector lines, comprises:
calculating the distance between the first virtual vector line to be matched and all second virtual vector lines;
determining the minimum distance in all the distances;
when the minimum distance is smaller than a preset threshold value, acquiring a second virtual vector line corresponding to the minimum distance;
and determining that the first virtual vector line to be matched currently is matched with the second virtual vector line corresponding to the minimum distance.
5. The method according to claim 4, wherein after said obtaining the second virtual vector line corresponding to the minimum distance, the method further comprises:
calculating an included angle between the first virtual vector line and a second virtual vector line corresponding to the minimum distance;
and when the difference value between the included angle and the standard right angle is within a preset range, determining that the second virtual vector line corresponding to the acquired minimum distance is matched with the first virtual vector line to be matched currently.
6. The text image display method according to claim 2, wherein after the matching of one second virtual vector line in the second virtual vector line set for each first virtual vector line included in the first virtual vector line set, the method further comprises:
and correcting two coincident end points of the first virtual vector line and the second virtual vector line to be the same end point, and obtaining a new first virtual vector line and a new second virtual vector line as the virtual vector line group.
7. The text image display method according to claim 1, wherein the determining the rotation angle of the text image to be corrected based on the virtual vector line includes:
acquiring coordinates of any two non-coincident points on the virtual vector line;
and calculating the rotation angle of the text image to be corrected by using a preset algorithm based on the coordinates of the two non-coincident points.
8. A text image display apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a text image to be corrected;
a first determining module, configured to determine a virtual vector line for the text image to be corrected, where the virtual vector line is a result of performing vectorization processing on any side of a minimum circumscribed rectangle of at least one text region in the text image to be corrected;
the second determining module is used for determining the rotation angle of the text image to be corrected based on the virtual vector line;
an adjusting module, configured to adjust the display direction of the text image to be corrected according to the rotation angle to obtain a normal reading image displayed in a text image coordinate system,
wherein the first determining module comprises:
a first determining unit, configured to determine a virtual vector line group for at least one text region in the text image to be corrected, where the virtual vector line group includes a first virtual vector line and a second virtual vector line, and the first virtual vector line and the second virtual vector line can share a same endpoint;
a second determining unit, configured to determine, based on a projection relationship of a cross product result of the first virtual vector line and the second virtual vector line on a Z-axis of the text image coordinate system, that the first virtual vector line or the second virtual vector line is the virtual vector line, the text image coordinate system is a rectangular coordinate system XYZ, and the text image is located on an XOY plane of the text image coordinate system. .
9. The text image display device according to claim 8, wherein the first determination unit is further configured to:
inputting the text image to be corrected into a pre-constructed point set detection model, and outputting a pixel point set obtained by detecting the text image to be corrected, wherein the pixel point set is a point set corresponding to two sides sharing the same end point in the minimum circumscribed rectangle of the text region;
converting the point set into a virtual vector line set by using a preset algorithm;
calculating the slope of each virtual vector line in the virtual vector line set, and dividing the slope into a first slope and a second slope;
determining a line corresponding to the first slope as a first virtual vector line set, and determining a line corresponding to the second slope as a second virtual vector line set;
and for each first virtual vector line included in the first virtual vector line set, matching a second virtual vector line in the second virtual vector line set to obtain the virtual vector line group.
10. The text image display apparatus according to claim 8, wherein the second determination unit is further configured to:
calculating a first cross product of the first virtual vector line and the second virtual vector line;
calculating a second cross product of the first axis standard unit vector and the second axis standard unit vector of the text image coordinate system;
and when the dot product of the first cross product and the second cross product meets a preset condition, determining the first virtual vector line or the second virtual vector line as the virtual vector line.
11. The text image display device according to claim 9, wherein the first determination unit is further configured to:
calculating the distances between the first virtual vector line to be matched and all second virtual vector lines;
determining the minimum distance of all the distances;
when the minimum distance is smaller than a preset threshold value, acquiring a second virtual vector line corresponding to the minimum distance;
and determining that the first virtual vector line to be matched currently is matched with the second virtual vector line corresponding to the minimum distance.
12. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
13. A computer-readable storage medium, having stored thereon a computer program for:
the computer program, when executed by a processor, implements the method of any of claims 1-7.
CN201911275212.XA 2019-12-12 2019-12-12 Text image display method, device, equipment and storage medium Active CN111062874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911275212.XA CN111062874B (en) 2019-12-12 2019-12-12 Text image display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911275212.XA CN111062874B (en) 2019-12-12 2019-12-12 Text image display method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111062874A CN111062874A (en) 2020-04-24
CN111062874B true CN111062874B (en) 2023-03-31

Family

ID=70298884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911275212.XA Active CN111062874B (en) 2019-12-12 2019-12-12 Text image display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111062874B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425142A (en) * 2008-09-17 2009-05-06 北大方正集团有限公司 Method and device for determining page angle of slope
CN101697228A (en) * 2009-10-15 2010-04-21 东莞市步步高教育电子产品有限公司 Method for processing text images
CN101751571A (en) * 2009-12-28 2010-06-23 山东大学 Practical binary document image tilt angle detection method
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
CN108446698A (en) * 2018-03-15 2018-08-24 腾讯大地通途(北京)科技有限公司 Method, apparatus, medium and the electronic equipment of text are detected in the picture
CN110427939A (en) * 2019-08-02 2019-11-08 泰康保险集团股份有限公司 Method, apparatus, medium and the electronic equipment of correction inclination text image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425142A (en) * 2008-09-17 2009-05-06 北大方正集团有限公司 Method and device for determining page angle of slope
CN101697228A (en) * 2009-10-15 2010-04-21 东莞市步步高教育电子产品有限公司 Method for processing text images
CN101751571A (en) * 2009-12-28 2010-06-23 山东大学 Practical binary document image tilt angle detection method
CN105761219A (en) * 2016-02-03 2016-07-13 北京云江科技有限公司 Inclination correction method and system of text image
CN108446698A (en) * 2018-03-15 2018-08-24 腾讯大地通途(北京)科技有限公司 Method, apparatus, medium and the electronic equipment of text are detected in the picture
CN110427939A (en) * 2019-08-02 2019-11-08 泰康保险集团股份有限公司 Method, apparatus, medium and the electronic equipment of correction inclination text image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
唐群群 ; 哈力木拉提・买买提 ; 艾尔肯・赛甫丁 ; .维吾尔文扫描页的倾斜校正.计算机应用研究.2013,(第05期),277-279+283. *
巨志勇 ; 何晓蕾 ; 王超男 ; .基于文本行基线的倾斜角检测算法.电子科技.2016,(第10期),45-48. *
曾凡锋 ; 吴飞飞 ; 肖珂 ; 王晓 ; .一种快速文本图像倾斜校正方法.计算机应用与软件.2015,(第04期),187-191. *

Also Published As

Publication number Publication date
CN111062874A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
US11120254B2 (en) Methods and apparatuses for determining hand three-dimensional data
CN108345882B (en) Method, apparatus, device and computer-readable storage medium for image recognition
CN113869293B (en) Lane line recognition method and device, electronic equipment and computer readable medium
US10452953B2 (en) Image processing device, image processing method, program, and information recording medium
CN111612852B (en) Method and apparatus for verifying camera parameters
CN113256742B (en) Interface display method and device, electronic equipment and computer readable medium
CN112991178B (en) Image splicing method, device, equipment and medium
CN112991180B (en) Image stitching method, device, equipment and storage medium
CN111325798A (en) Camera model correction method and device, AR implementation equipment and readable storage medium
CN111291753A (en) Image-based text recognition method and device and storage medium
CN113077548A (en) Collision detection method, device, equipment and storage medium for object
CN112241739A (en) Method, device, equipment and computer readable medium for identifying text errors
US11205281B2 (en) Method and device for image rectification
CN113516697B (en) Image registration method, device, electronic equipment and computer readable storage medium
CN111062874B (en) Text image display method, device, equipment and storage medium
CN108780572A (en) The method and device of image rectification
CN108734665A (en) A kind of bearing calibration of image, device, equipment and storage medium
CN109493423B (en) Method and device for calculating midpoint positions of two points on surface of three-dimensional earth model
EP4318314A1 (en) Image acquisition model training method and apparatus, image detection method and apparatus, and device
CN109934058B (en) Face image processing method, face image processing device, electronic apparatus, storage medium, and program
CN113344977B (en) Contact pressure measurement model construction method based on image processing
CN115205807A (en) Lane line fusion method and device, automobile, electronic equipment and computer-readable storage medium
CN108122200A (en) Image split-joint method and device
CN114119990A (en) Method, apparatus and computer program product for image feature point matching
CN113408551A (en) Pointer instrument reading identification method, system, equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021150

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant